移动端Vue.js图片预览插件

vue-picture-preview

移动端Vue.js图片预览插件 | Mobile-friendly picture file preview Vue.js plugin with horizontal nav and bottom title.

安装

npm

npm install --save vue-picture-preview

使用

首先在项目的入口文件中引入, 调用 Vue.use 安装。

import vuePicturePreview from 'vue-picture-preview'

Vue.use(vuePicturePreview)

在根组件添加 lg-preview 组件的位置

   

   

对于所有图片都可以使用 v-preview 指令来绑定他们的预览功能

export default {

    data () {

        return {

            imgs: ['http://covteam.u.qiniudn.com/ka2.jpg', 'http://covteam.u.qiniudn.com/poster.png']

        }

    }

}

API

isTitleEnable: (boolean, optional) 设置 isTitleEnable="false" 将禁用水平导航. 默认值: true.

isHorizontalNavEnable: (boolean, optional) 设置 isHorizontalNavEnable="false" 将禁用底部标题. 默认值: true.

你可能感兴趣的:(移动端Vue.js图片预览插件)