摘要: 1、执行npm install 报错: npm ERR! code MODULE_NOT_FOUND npm ERR! Cannot find module 'internal/util/types' npm ERR! A complete log of this run can be found 阅读全文
posted @ 2022-06-30 15:47 银河游鱼 阅读(404) 评论(0) 推荐(0) 编辑
摘要: 1.通过json的方式克隆 let obj={a:"123",b:"sad"} let clone_obj= JSON.parse(JSON.stringify(obj)) 2.通过循环遍历的方式 function deepClone(obj) { let newObj = Array.isArra 阅读全文
posted @ 2021-12-02 18:33 银河游鱼 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 1.数组首尾添加/移除数组元素: arr.push(...items) —— 从尾端添加元素 arr.pop() —— 从尾端提取元素 arr.shift() —— 从首端提取元素 arr.unshift(...items) —— 从首端添加元素 arr.splice(start[, deleteC 阅读全文
posted @ 2021-08-25 10:03 银河游鱼 阅读(44) 评论(0) 推荐(0) 编辑
摘要: 1.生成git仓库: 创建一个文件夹:执行 git init 命令初始化git仓库; 2.连接到远程git仓库: git remote add github git@gitee.com:gitzqs/仓库名称; 3.拉取远程文件到本地: git pull github master 4、把文件添加到 阅读全文
posted @ 2021-05-24 15:28 银河游鱼 阅读(39) 评论(0) 推荐(0) 编辑
摘要: 1.在动态组件中使用: <keep-alive :include="whiteList" :exclude="blackList" :max="amount"> <component :is="currentComponent"></component> </keep-alive> 2.在vue-r 阅读全文
posted @ 2021-01-25 14:16 银河游鱼 阅读(105) 评论(0) 推荐(0) 编辑
摘要: debounce(func,delay){ let timer =null; return function(...args){ if(timer) clearTimeout(timer); timer = setTimeout(()=>{ func.apply(this,args) },delay 阅读全文
posted @ 2021-01-20 15:26 银河游鱼 阅读(102) 评论(0) 推荐(0) 编辑
摘要: <div class="customerdetails_tabs" v-if="isRouterAlive"></div> export default { provide(){ return{ reload:this.reload } }, data() { return { isRouterAl 阅读全文
posted @ 2021-01-18 10:48 银河游鱼 阅读(343) 评论(0) 推荐(0) 编辑
摘要: 1.使用方法: export function request(config){ const intance =axios.create({ baseUrl:请求地址', timeout:5000, }) //axios的拦截器的使用; intance.interceptors.request.us 阅读全文
posted @ 2021-01-12 14:55 银河游鱼 阅读(144) 评论(0) 推荐(0) 编辑
摘要: export function request(config,success,failure){ return new Promise((resolve,reject)=>{ const intance =axios.create({ baseUrl:'http://192.168.32.12', 阅读全文
posted @ 2021-01-08 15:14 银河游鱼 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 1.安装:npm install axios --save 2.引入:import axios from 'axios' 3.基本使用: //默认是GET请求axios({ url:'api' }).then((res)=>{ console.log(res) }) 4.处理多个并发使用axios. 阅读全文
posted @ 2020-12-29 16:06 银河游鱼 阅读(105) 评论(0) 推荐(0) 编辑