npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue2-img-compare

v0.0.8

Published

Simple, responsive, highly available image comparison component using vue.js 2.0

Downloads

9

Readme

vue2-img-compare 最简单功能强大的图片对比组件

demo img

Currently, it is a version of vue 2.0. If you need a version of vue 3.0+TS or react, please refer to issues.

Best Picture Comparison Component.

强大而且简洁,vue3.0+TS版本和react版本需求有了再改版吧

Installation

npm i vue2-img-compare -S
yarn add vue2-img-compare -S

Usage

import Vue from 'vue';
import Vue2ImgCompare from 'vue2-img-compare'
import 'vue2-img-compare/index.css'

Vue.use(Vue2ImgCompare)
new Vue().$mount('#app');
<div id="app">
  <vue2-img-compare
      w="820px"
      h="496"
      picL="https://marcincichocki.github.io/vue-image-compare/img/after.jpg"
      picR="https://marcincichocki.github.io/vue-image-compare/img/before.jpg"
      textL="after"
      textR="before"
    />
</div>

If you are not using using es6, instead of importing add

<script src="/vue2-img-compare/index.umd.js"></script>

just before closing body tag.

Props

| Name | Type | Description | Required | Default | | --- | --- | --- | --- | --- | | w | String or Number | "width" can set number or string(vw or % or px) | Yes | undefined | | h | String or Number | "height" can set number or string(vw or % or px) | Yes | undefined | | picL | String | Path to the image image after change | Yes | undefined | | picR | String | Path to the image image before change | Yes | undefined | | textL | String | text in after change | No | null | | textR | String | text in before change | No | null |

Example:

<vue2-img-compare
      w="820px"
      h="496"
      picL="https://marcincichocki.github.io/vue-image-compare/img/after.jpg"
      picR="https://marcincichocki.github.io/vue-image-compare/img/before.jpg"
      textL="after"
      textR="before"
    />

License

MIT