🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

vue-viewjs

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-viewjs

A picture view base on viewerjs

latest
npmnpm
Version
1.0.7
Version published
Maintainers
1
Created
Source

vue-viewjs

A picture view use vue base on viewerjs 一个vue组件 基于 viewerjs的图片查看器 viewer 地址 https://github.com/fengyuanchen/viewer

Build Setup

# install the package
npm i vue-viewjs

# in the main.js import the package
 ## 全局引用
import {globalcom} from 'vue-viewjs'
Vue.use(globalcom)

 ## 局部引用
 import {partial} from 'vue-viewjs' 
# use the components
  <picview ref="picviewer" :list="list" />
  # in the data 
   list: [{
        url: 'http://img.zcool.cn/community/0117e2571b8b246ac72538120dd8a4.jpg@1280w_1l_2o_100sh.jpg'
      }, {
        url: 'http://img.zcool.cn/community/0117e2571b8b246ac72538120dd8a4.jpg@1280w_1l_2o_100sh.jpg'
      }
      ]
      #### config 参考 https://github.com/fengyuanchen/viewer
      var config = {
        button: false, // 顶部关闭按钮
        // navbar: true, // 底部图片缩略图 默认true
        title: false, // 图片标题
        toolbar: {
          // zoomIn: true,
          // zoomOut: true,
          // oneToOne: false,
          // reset: true,
          // prev: true,
          // play: {
          //   show: true,
          //   size: 'large'
          // },
          // next: true,
          // rotateLeft: true,
          // rotateRight: true,
          // flipHorizontal: false,
          // flipVertical: false
        },
        tooltip: true,
        hidden: () => {
          console.log(0)
        },
        show: () => {
          this.showicon()
        }
      }
    # use the show methods to show the picture view
    this.$refs.picviewer.show(config)

FAQs

Package last updated on 01 Nov 2018

Did you know?

Socket

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.

Install

Related posts