本文实例讲述了Vue图片浏览组件v-viewer用法。分享给大家供大家参考,具体如下:
v-viewer
用于图片浏览的Vue组件,支持旋转、缩放、翻转等操作,基于viewer.js。
从0.x迁移
你需要做的唯一改动就是手动引入样式文件:
import 'viewerjs/dist/viewer.css'
安装
使用npm命令安装
npm install v-viewer
使用
引入v-viewer及必需的css样式,并使用Vue.use()注册插件,之后即可使用。
<template>
<div id=app>
<!-- directive -->
<div class