随笔分类 -  Vue

摘要:通过vue-cli新建的项目,导入组件时有报错提示: 解决:调整项目的打开层级,用VSCode直接打开项目 阅读全文
posted @ 2021-07-05 10:30 LucasLin 阅读(136) 评论(0) 推荐(0)
摘要:场景 Vue2.6.12 模式:单页面应用(SPA)模式 路由模式:history 模式 【问题一】 刷新页面,出现 Cannot GET / xxx 【解决】 设置 historyApiFallback: true webpack.config.js devServer: { ... histor 阅读全文
posted @ 2020-12-24 22:13 LucasLin 阅读(2072) 评论(0) 推荐(0)
摘要:问题描述: .vue 文件中的样式不起作用(或没被插入到 style 标签中) 环境: vue:2.6.12 css-loader:4.3.0 vue-loader-style:4.1.0 webpack 配置 { test: /\.scss$/, use: ['vue-style-loader', 阅读全文
posted @ 2020-12-13 20:21 LucasLin 阅读(546) 评论(0) 推荐(0)
摘要:问题:本地开发模式运行Vuepress 1.x 时,浏览器不能自动更新 在 package.json 中将运行命令 由 "dev": "vuepress dev docs" 改为 "dev": "vuepress dev docs --temp .temp" 即可解决 附: 因为届时运行 vuepr 阅读全文
posted @ 2020-08-02 20:43 LucasLin 阅读(2184) 评论(1) 推荐(0)
摘要:1. 报错代码示例: 报错截图: 报错分析:使用 ,变成一个 JavaScript 表达式: ,显然这种写法是错误的,因为 号右边不是一个正确的数据类型(字符串需要引号包裹)。 修复: ( 双引号内还要有单引号 ) 完整代码: Vue.component('person', { props: ['a 阅读全文
posted @ 2020-04-25 11:19 LucasLin 阅读(249) 评论(0) 推荐(0)