会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
87的海雷
搬砖的人
博客园
首页
新随笔
联系
管理
订阅
2024年9月14日
js,javascript 根据 xpath 路劲定位节点
摘要: 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海雷
阅读(114)
评论(0)
推荐(0)
2023年12月11日
js(canvas) 图片压缩
摘要: 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海雷
阅读(37)
评论(0)
推荐(0)
2023年10月25日
javascript js 禁止遍历属性
摘要: Object.defineProperty(Object.prototype, "test", { enumerable: false, //禁止遍历 value: function (o) { console.log(o) } })
阅读全文
posted @ 2023-10-25 11:35 87de海雷
阅读(72)
评论(0)
推荐(0)
2023年8月30日
JavaScript 冷知识
摘要: 数据类型的判断 typeof Symbol(); // symbol 有效 typeof ''; // string 有效 typeof 1; // number 有效 typeof true; //boolean 有效 typeof undefined; //undefined 有效 typeof
阅读全文
posted @ 2023-08-30 11:12 87de海雷
阅读(25)
评论(0)
推荐(0)
2023年8月2日
js sum 函数
摘要: 实现: 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海雷
阅读(291)
评论(0)
推荐(0)
2023年6月9日
js array groupby 数组分组
摘要: /** * 组件名称 * @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海雷
阅读(253)
评论(0)
推荐(0)
2023年4月10日
.net6 WPF DD 驱动级按键
摘要: namespace Jx3KeyPress { /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { /// <summary
阅读全文
posted @ 2023-04-10 15:42 87de海雷
阅读(145)
评论(0)
推荐(0)
2023年3月23日
EPPuls Excel 导入导出
摘要: /// <summary> /// Excel导出 /// </summary> public static class ExcelHelper { /// <summary> /// 设置表格样式 /// </summary> /// <param name="cell"></param> ///
阅读全文
posted @ 2023-03-23 10:19 87de海雷
阅读(103)
评论(0)
推荐(0)
2022年12月28日
vue3 拖放上传
摘要: <template> <div class="upload-file" @dragover="$event.preventDefault()" @dragenter="$event.preventDefault()" @drop="dropEvent"> <el-icon size="50px">
阅读全文
posted @ 2022-12-28 08:47 87de海雷
阅读(268)
评论(0)
推荐(0)
2022年6月14日
vue3 vite打包 图片
摘要: const logo = new URL(`/src/assets/logo.png`, import.meta.url).href
阅读全文
posted @ 2022-06-14 08:59 87de海雷
阅读(367)
评论(0)
推荐(0)
下一页
公告