首页 > 技术文章 > vue-preview

cjuan 2018-09-28 13:35 原文

 vue-preview点击一张图片,预览这种大图

 https://github.com/LS1231/vue-preview有使用详情

1. 安装

$ npm install vue-preview --save

2. 在webpack.config.js指定的入口文件中

import VuePreview from 'vue-preview'
Vue.use(VuePreview)

3. webpack.config.js中配置(有些可以不用配置,基本不用配置

loader:{
        test : /vue-preview.src.*?js$/, 
      loader : 'babel' 
}

 

4.  .vue页面的<template></template>中直接使用:<vue-preview></vue-preview>

 参考:

如有侵权,联系删除

推荐阅读