上一页 1 2 3 4 5 6 ··· 22 下一页
摘要: import Vue from "vue" let startTestModel = true //开启测试模式 const BASE_URL = '' // 接口域名 const IMG_URL = '' // 图片域名 // 声明 测试模式 console.log("%c".concat("开发 阅读全文
posted @ 2023-07-09 09:36 Panax 阅读(115) 评论(0) 推荐(0)
摘要: /** * Created by zrs */ import Vue from 'vue' /** * json拼接为字符串 * @param json * @returns {string} */ export function qs (json) { let str = '' for (let 阅读全文
posted @ 2023-07-09 09:15 Panax 阅读(12) 评论(0) 推荐(0)
摘要: const http = require('http'); const hostname = '127.0.0.1'; const port = 3000; const server = http.createServer((req, res) => { res.statusCode = 200; 阅读全文
posted @ 2023-07-08 15:35 Panax 阅读(8) 评论(0) 推荐(0)
摘要: function parseTree(tree) { const res = [] array.forEach(item => { // 如果item中有children,则递归调用 item.parentId = item.parentId || 0; let id = item.id let c 阅读全文
posted @ 2023-07-07 10:45 Panax 阅读(19) 评论(0) 推荐(0)
摘要: /** * 提取对象中的指定的属性,返回一个新对象 */ function pickProps(obj, props) { if (typeof obj !== 'object') { return obj; } const newObj = {}; props.forEach((prop) => 阅读全文
posted @ 2023-07-07 09:43 Panax 阅读(17) 评论(0) 推荐(0)
摘要: /** * 提取若干数组中指定字段组合成一个新数组 */ function extractProps(arr, prop) { return arr.map((item) => item[prop]); } 阅读全文
posted @ 2023-07-07 09:40 Panax 阅读(10) 评论(0) 推荐(0)
摘要: function deepClone(obj) { if (obj null) return null; if (typeof obj !== 'object') return obj; if (obj instanceof Date) { let date = new Date(); date.s 阅读全文
posted @ 2023-07-07 09:30 Panax 阅读(9) 评论(0) 推荐(0)
摘要: // 把若干数组按指定的字段名进行分组 function groupBy(list, propName) { return list.reduce((acc, item) => { const key = item[propName]; if (!acc[key]) { acc[key] = []; 阅读全文
posted @ 2023-07-07 09:28 Panax 阅读(17) 评论(0) 推荐(0)
摘要: // 身份证号function isIdCard(str) { return /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(str); } // 阅读全文
posted @ 2023-07-07 09:17 Panax 阅读(29) 评论(0) 推荐(0)
摘要: // 可被用来过渡的background-color background-position border-color border-width border-spacing bottom color font-size font-weight height left letter-spacing 阅读全文
posted @ 2023-07-07 09:09 Panax 阅读(8) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 22 下一页