摘要: function Evaluate(xpath){ var doc = document.evaluate(xpath,document,null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null) var arr = [] for(var i=0;i < 阅读全文
posted @ 2024-09-14 11:08 87de海雷 阅读(0) 评论(0) 推荐(0) 编辑
摘要: 1 function compress(url, width, height) { 2 return new Promise((resolve, reject) => { 3 let img = document.createElement('img') 4 img.onload = () => { 阅读全文
posted @ 2023-12-11 09:36 87de海雷 阅读(17) 评论(0) 推荐(0) 编辑
摘要: Object.defineProperty(Object.prototype, "test", { enumerable: false, //禁止遍历 value: function (o) { console.log(o) } }) 阅读全文
posted @ 2023-10-25 11:35 87de海雷 阅读(41) 评论(0) 推荐(0) 编辑
摘要: 数据类型的判断 typeof Symbol(); // symbol 有效 typeof ''; // string 有效 typeof 1; // number 有效 typeof true; //boolean 有效 typeof undefined; //undefined 有效 typeof 阅读全文
posted @ 2023-08-30 11:12 87de海雷 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 实现: Array.prototype.Sum = function (fn) { return eval(this.map(x => Number(typeof fn == "function" ? fn(x) : x)).join("+")) || 0 } 用法示例: var arr1 = [{ 阅读全文
posted @ 2023-08-02 09:10 87de海雷 阅读(190) 评论(0) 推荐(0) 编辑
摘要: /** * 组件名称 * @module tool.js * @desc 数据分组 * @author DHL * @date 2017年12月05日17:22:43 * @param { Function } func - 方法 * @example 调用示例 * [].groupBy(x=>({ 阅读全文
posted @ 2023-06-09 09:53 87de海雷 阅读(191) 评论(0) 推荐(0) 编辑
摘要: namespace Jx3KeyPress { /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { /// <summary 阅读全文
posted @ 2023-04-10 15:42 87de海雷 阅读(103) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// Excel导出 /// </summary> public static class ExcelHelper { /// <summary> /// 设置表格样式 /// </summary> /// <param name="cell"></param> /// 阅读全文
posted @ 2023-03-23 10:19 87de海雷 阅读(65) 评论(0) 推荐(0) 编辑
摘要: <template> <div class="upload-file" @dragover="$event.preventDefault()" @dragenter="$event.preventDefault()" @drop="dropEvent"> <el-icon size="50px"> 阅读全文
posted @ 2022-12-28 08:47 87de海雷 阅读(238) 评论(0) 推荐(0) 编辑
摘要: const logo = new URL(`/src/assets/logo.png`, import.meta.url).href 阅读全文
posted @ 2022-06-14 08:59 87de海雷 阅读(336) 评论(0) 推荐(0) 编辑