摘要: 路由配置页面: main.js: 阅读全文
posted @ 2020-03-15 21:00 徐林俊 阅读(787) 评论(0) 推荐(0) 编辑
摘要: 使用 npm run build 打包之后,在dist文件中的index.html文件中,搜索 viewport,结果如下: 将此标签使用如下标签替换即可: <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0 阅读全文
posted @ 2020-03-15 20:45 徐林俊 阅读(8264) 评论(0) 推荐(0) 编辑
摘要: 在根目录下新建 .eslintrc.js 文件,内容如下: module.exports = { root: true, env: { node: true }, extends: ["plugin:vue/essential"], // "@vue/prettier" rules: { "no-c 阅读全文
posted @ 2020-03-15 20:36 徐林俊 阅读(279) 评论(0) 推荐(0) 编辑
摘要: 一、问题描述 执行 npm run build 命令后,打包生成dist文件夹,访问的时候报如下错误: 二、解决办法 在根目录下,新建 vue.config.js文件,内容如下, module.exports = { publicPath:'./', configureWebpack:{ resol 阅读全文
posted @ 2020-03-15 19:50 徐林俊 阅读(1378) 评论(0) 推荐(0) 编辑
摘要: 一、检测vue-cli版本 使用如下命令,检测vue-cli版本,如果版本不是4版本,需升级。 二、创建项目 创建项目的命令语法如下: vue create <Project Name> // 项目的名字不允许含有大写字母 1、创建项目 使用命令出现如下界面,这里有俩个选项,一个是默认配置,一个是手 阅读全文
posted @ 2020-03-15 19:19 徐林俊 阅读(565) 评论(0) 推荐(0) 编辑