Vue
Vue学习笔记和问题解决记录
清风明月的博客
千言不如一默
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
18条Vue项目代码和性能优化整理
1、v-if和v-show 区别:v-if为false时不渲染DOM,v-show渲染DOM 权限相关的展示用v-if 其他频繁切换用v-show,不频繁切换用v-if 使用v-if可以减少DOM数量,加快页面渲染 使用三木运算符、&&或者||替代v-if v-if里面的表达式与判断,建议在methods和computed里面封装成一个方法,方便复用 错误优先出return if (!valid) { this.$message.error('信息输入有误'); retu原创 2021-05-11 21:13:14 · 1539 阅读 · 0 评论 -
Vue3.0常见报错解决整理
1.报错:This dependency was not found: vue-router in ./src/router/Index.js 原因:vue-router 没有安装 运行:npm install --save vue-router 2.报错:Failed to resolve loader: less-loader You may need to install it. 或者Syntax Error: Error: Cannot find module ‘less’ 原因:less-原创 2021-02-02 20:40:50 · 2437 阅读 · 1 评论 -
用this.$route.meta.title直接修改title不更新解决方案
在vue里面直接修改this.$route.meta.title值,页面title并不改变,解决方法是强制刷新页面 this.$route.meta.title = data.name; this.$router.replace({ query: { temp: Date.now() //必有 ... //页面其他参数 } }); ...原创 2020-11-19 09:07:27 · 7641 阅读 · 6 评论 -
vue项目依赖升级报错处理
1.依赖升级后遇到的问题由autoprefixer版本引起的 warning: Second Autoprefixer control comment was ignored. Autoprefixer applies control comment to whole block, not to next rules 解决方法: // 将样式中像下面的写法 /* autoprefixer: off */ .... /* autoprefixer: on */ // 改为 /* autoprefixer:原创 2021-03-20 14:20:40 · 3176 阅读 · 0 评论 -
vue中用装饰器报错:Parsing error: Decorators cannot be used to decorate object literal properties
报错信息:error: Parsing error: Decorators cannot be used to decorate object literal properties 解决办法: 在.eslintrc.js文件加入legacyDecorators: true就可以支持装饰器的写法了 parserOptions: { // 解析器 parser: 'babel-eslint', ecmaFeatures:{ // 支持装饰器 legacyDeco原创 2021-03-12 16:19:39 · 2935 阅读 · 2 评论 -
Vue.js在移动端和PC端有哪些好用的UI框架呢?
移动端: VUX 设计清爽 VUX:https://doc.vux.li/zh-CN/components/actionsheet.html Vant 好看好用 Vant:https://youzan.github.io/vant/#/zh-CN/ PC端: ant-design-vue:https://www.antdv.com/components/skeleton-cn/ ElementUI:https://element.eleme.io/#/zh-CN/component/installation原创 2021-03-05 18:17:18 · 615 阅读 · 0 评论
分享