摘要: 1. 安装 nodejs 地址:https://nodejs.org/zh-cn/ 2. 全局安装 http-server npm install http-server -g 3. 开启 http-server服务 切换到需要运行的dist文件目录上层、 命令:http-server ./dist 阅读全文
posted @ 2021-05-14 15:51 云鹤^ 阅读(221) 评论(0) 推荐(0)
摘要: 配置封装axios import Axios from 'axios' const axios= Axios.create({ baseURL: '/', //基础URL timeout: 2000, //请求延时时间 headers: {'X-Requested-With': 'XMLHttpRe 阅读全文
posted @ 2021-05-14 15:11 云鹤^ 阅读(124) 评论(0) 推荐(0)
摘要: 新建vue config.js配置文件 module.exports = { publicPath: './', //项目打包文件为路径为:./ 相对路径 , / 绝对路径 outputDir: 'dist', //输出文件目录:在npm run build时,生成文件的目录名称 assetsDir 阅读全文
posted @ 2021-05-14 14:37 云鹤^ 阅读(644) 评论(0) 推荐(0)