使用vue-preview的步骤:

2019-02-14  本文已影响0人  奔跑的三明治

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/

效果:

上一篇 下一篇

猜你喜欢

热点阅读