vue
是小丸子呀
这个作者很懒,什么都没留下…
展开
-
vue中动态绑定class
对象方法::class="{ 'active': isActive }"/*如果isActive为真,则class="active"*/判断是否绑定:class="{'active':isActive==-1}" 或者:class="{'active':isActive==index}"判断绑定多个第一种(用逗号隔开):class="{ 'active': isActive, 'sort': isSort }"第二种(放在data里面)//也可以把后面绑定的对象写在一个变量放在da原创 2021-04-16 17:06:39 · 169 阅读 · 0 评论 -
Vue图片浏览组件v-viewer使用方法
v-viewer用于图片浏览的Vue组件,支持旋转、缩放、翻转等操作,基于viewer.js。viewerjs安装依赖:npm install v-viewer --save全局引入:import Viewer from 'v-viewer'import 'viewerjs/dist/viewer.css'Vue.use(Viewer)Viewer.setDefaults({ Options: { 'inline': true, 'button': true, 'navbar':原创 2021-03-29 13:47:17 · 2130 阅读 · 1 评论 -
vue打包路径设置
vue 打包路径设置vue打包默认路径css中图片路径等vue打包默认路径1.vue打包之后的默认路径是从根目录开始算的,如果你的项目并不是根目录,而是子目录,这种设置就会导致路径错误,解决方法:修改config/index.js下面的代码,将assetsPublicPath: '/'跟路径修改为assetsPublicPath: './'当前文件夹路径css中图片路径等解决之后,发现组件中的css的背景图片路径不对,无论放到static还是assets里面,最后解析出来的都是/static/i原创 2021-03-24 17:01:39 · 8121 阅读 · 0 评论