随笔分类 -  常用方法

摘要:http://datav.aliyun.com/portal/school/atlas/area_selector#&lat=32.05930026106166&lng=117.26257324218749&zoom=7 阅读全文
posted @ 2024-11-14 09:21 三水儿 阅读(283) 评论(0) 推荐(0) 编辑
摘要:replacePropertyName(arr, oldProp, newProp) { return arr.map(item => { const { [oldProp]: oldValue, ...rest } = item; // 提取旧属性并存储其值 const newItem = { . 阅读全文
posted @ 2024-11-05 09:47 三水儿 阅读(3) 评论(0) 推荐(0) 编辑
摘要://重置下载文件前缀地址 export const getDownloadPrefix = (url) => { let suffix = window.location.origin + window.location.pathname; //获取前缀 if (process.env.NODE_E 阅读全文
posted @ 2024-11-04 11:24 三水儿 阅读(8) 评论(0) 推荐(0) 编辑
摘要:关于去重最先想到的思路就是双层循环,通过遍历比较。 1. splice var arr = [1, 2, 1, undefined, undefined, null, null, NaN, NaN, 'NaN', {}, {}]; for (var i = 0; i < arr.length; i+ 阅读全文
posted @ 2022-07-26 16:03 三水儿 阅读(23) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示