05 2024 档案
js使用中文集进行排序
摘要:Array.prototype.sort((a, b)=> a.localeCompare(b)) ### 举个例子 ['b', 'a', 'd', 'c'].sort((a, b) => a.localeCompare(b))
大屏自适应
摘要:export const AutoScale = (targetEl, options, root)=> { const el = document.querySelector(targetEl); if(!el) throw new Error("初始化失败"); const { width, h
node.js 封装操作文件类
摘要:const fs = require('fs'); const path = require('path'); class File { constructor(fileName, name, ext, isFile, size, createTime, updateTime) { this.fil