摘要:
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 阅读全文
摘要:
1.通过json的方式克隆 let obj={a:"123",b:"sad"} let clone_obj= JSON.parse(JSON.stringify(obj)) 2.通过循环遍历的方式 function deepClone(obj) { let newObj = Array.isArra 阅读全文
摘要:
1.数组首尾添加/移除数组元素: arr.push(...items) —— 从尾端添加元素 arr.pop() —— 从尾端提取元素 arr.shift() —— 从首端提取元素 arr.unshift(...items) —— 从首端添加元素 arr.splice(start[, deleteC 阅读全文
摘要:
1.生成git仓库: 创建一个文件夹:执行 git init 命令初始化git仓库; 2.连接到远程git仓库: git remote add github git@gitee.com:gitzqs/仓库名称; 3.拉取远程文件到本地: git pull github master 4、把文件添加到 阅读全文
摘要:
1.在动态组件中使用: <keep-alive :include="whiteList" :exclude="blackList" :max="amount"> <component :is="currentComponent"></component> </keep-alive> 2.在vue-r 阅读全文
摘要:
debounce(func,delay){ let timer =null; return function(...args){ if(timer) clearTimeout(timer); timer = setTimeout(()=>{ func.apply(this,args) },delay 阅读全文
摘要:
<div class="customerdetails_tabs" v-if="isRouterAlive"></div> export default { provide(){ return{ reload:this.reload } }, data() { return { isRouterAl 阅读全文
摘要:
1.使用方法: export function request(config){ const intance =axios.create({ baseUrl:请求地址', timeout:5000, }) //axios的拦截器的使用; intance.interceptors.request.us 阅读全文
摘要:
export function request(config,success,failure){ return new Promise((resolve,reject)=>{ const intance =axios.create({ baseUrl:'http://192.168.32.12', 阅读全文
摘要:
1.安装:npm install axios --save 2.引入:import axios from 'axios' 3.基本使用: //默认是GET请求axios({ url:'api' }).then((res)=>{ console.log(res) }) 4.处理多个并发使用axios. 阅读全文