
Security News
US Government Forces Anthropic to Pull Claude Fable Days After Launch
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.
@youngbeen/vue-snapshot-compare
Advanced tools
[toc]
A vue component of comparing snapshots. See demo
npm install @youngbeen/vue-snapshot-compare
in script
import SnapshotCompare from '@youngbeen/vue-snapshot-compare'
import coverImage from '@/your/local/image'
...
components: {
SnapshotCompare
},
data () {
return {
coverImage: coverImage,
bottomImage: 'https://example.com/some_remote_image.png'
}
}
in template
<snapshot-compare
:bottom-image="bottomImage"
:cover-image="coverImage"></snapshot-compare>
That's all!
You can customize some config via props
Please noted that if you want to set width, just set css style to the component's parent. This component is a
blockhence it will extend itself to fullfill it's parent width.
You can set an exact height by heightLimit, the unit is px. Default height limit is none, height is auto.
<snapshot-compare
:bottom-image="bottomImage"
:cover-image="coverImage"
:heightLimit="300"></snapshot-compare>
You can set seperator style by seperator. Valid values are slash and vertical, default value is slash.
<snapshot-compare
:bottom-image="bottomImage"
:cover-image="coverImage"
:seperator="'vertical'"></snapshot-compare>
You can set seperator color by seperatorColor. Valid value accept all valid css values(e.g. red, #fff, transparent). Default value is #fff.
<snapshot-compare
:bottom-image="bottomImage"
:cover-image="coverImage"
:seperatorColor="'red'"></snapshot-compare>
You can set initial seperator position by position. Valid values are numbers between 0~1( 0 stands for left edge while 1 stands for right edge). Default value is 0.5 which means middle.
<snapshot-compare
:bottom-image="bottomImage"
:cover-image="coverImage"
:position="0.75"></snapshot-compare>
FAQs
A snapshot comparing vue component
We found that @youngbeen/vue-snapshot-compare demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.

Security News
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.