摘要: ####开发环境 故名思意码农的开发过程中使用的环境 ####生产环境 指正式投入使用的环境,即对外开放的环境 ####测试环境 指生产环境之前的测试生产环境是否稳定的环境,一般是复制生产环境的配置使用 ####如何在项目中丝滑的切换环境呢? 在根目录建立.env系列文件 .env.developm 阅读全文
posted @ 2022-04-25 13:37 w1ndz 阅读(887) 评论(0) 推荐(0)
摘要: cursor: pointer; 阅读全文
posted @ 2022-04-24 17:46 w1ndz 阅读(45) 评论(0) 推荐(0)
摘要: 首先下载依赖 npm install echarts 全局引入 在main.js中 import Vue from 'vue' //全局引入echarts import * as echarts from 'echarts'; //需要挂载到Vue原型上 Vue.prototype.$echarts 阅读全文
posted @ 2022-04-11 11:54 w1ndz 阅读(523) 评论(0) 推荐(0)
摘要: ####节流:在设定的时间内,只能执行一次,重复执行不生效 functon throttle(fn,wait=50){ //初始化一个变量用于存上次执行的时间戳 let item=0; return function(...rest){ //生成最新的时间戳 let newItem=new Date 阅读全文
posted @ 2022-03-29 17:18 w1ndz 阅读(99) 评论(0) 推荐(0)
摘要: ####防抖:一个函数在规定的时间内只能执行一次,重复执行会重置等待的时间 function debounced(fn, wait = 50) { let item; return function (...rest) { if (item) clearTimeout(item); item = s 阅读全文
posted @ 2022-03-29 17:09 w1ndz 阅读(77) 评论(0) 推荐(0)
摘要: 首先准备好需要模拟的数据--floor.json [ { "id":"1", "imgUrl":"/images/banner1.jpg" }, { "id":"2", "imgUrl":"/images/banner2.jpg" }, { "id":"3", "imgUrl":"/images/b 阅读全文
posted @ 2022-03-29 16:52 w1ndz 阅读(334) 评论(0) 推荐(0)
摘要: 例:图片无法显示 <img src="https://pic.cnblogs.com/avatar/1549846/20191126100502.png" alt="加载失败"> 解决方案: 只需要在<head>标签内添加 <meta name="referrer" content="no-refe 阅读全文
posted @ 2022-03-13 15:09 w1ndz 阅读(3483) 评论(0) 推荐(0)
摘要: 控制台报错NavigationDuplicated 原因:vue-router升级3.1.0版本之后,引入promise的语法,出现的问题 解决方案: 1.为每一个增加回调函数,vue-router的开发者给出了解决方法 2.将vue-router版本降低到3.1.0版本以下 3.重写原型上的pus 阅读全文
posted @ 2022-02-23 10:30 w1ndz 阅读(267) 评论(0) 推荐(0)
摘要: 在根目录下,新建jsconfig.json文件 { "compilerOptions": { "baseUrl": "./", "paths": { "@/*": ["src/*"] } }, "exclude": ["node_modules", "dist"] } 阅读全文
posted @ 2022-02-23 10:28 w1ndz 阅读(34) 评论(0) 推荐(0)
摘要: 在根目录下新建vue.config.js文件,代码如下 module.exports = { lintOnSave: false, // 当保存时不进行eslint的检查 devServer: { open: true, // 自动打开 port: 8081, //修改启动的端口号 } } 阅读全文
posted @ 2022-02-23 10:27 w1ndz 阅读(216) 评论(0) 推荐(0)