js
QIANG123___
这个作者很懒,什么都没留下…
展开
-
js对象深拷贝
// 对象深拷贝const deepClone = function deepClone(obj) { const c = obj instanceof Array ? [] : {}; Object.entries(obj).forEach((item) => { const prop = obj[item[0]]; if (typeof prop === 'o...原创 2019-10-24 17:40:23 · 150 阅读 · 0 评论 -
js模糊筛选后台管理菜单列表(树结果处理)
filterMenuHandle(val, allMenuList) { const rebuildData = (value, arr) => { let newarr = []; arr.forEach(element => { if (element.children &&...转载 2019-08-07 11:28:05 · 462 阅读 · 2 评论 -
封装简单的ajax支持promise
// 封装axios(function () {const myAxios = function (options = {}) {myAxios.createDef = myAxios.createDef || {};// 默认参数myAxios._default = {method: 'GET',url: '',baseURL: '',cache: false...翻译 2019-08-30 15:01:46 · 177 阅读 · 0 评论