vue-preview的使用步骤:
1.下载
cnpm i vue-preview;
2.在main.js中加载:
import VuePreview from'vue-preview'
Vue.use(VuePreview)
3在tamplate中引入html代码:

4.list格式:
list: [{
src: 'https://placekitten.com/600/400',
w: 600,
h: 400 }, {
src: 'https://placekitten.com/1200/900',
w: 1200,
h: 900 }]

使用链接:https://www.npmjs.com/package/vue-preview/
效果:

网友评论