随笔分类 -  js

摘要:$(".article-content-wrap").unbind("copy").bind("copy", (function(e) { e.preventDefault() e.stopPropagation() event.clipboardData.setData("text/plain", 阅读全文
posted @ 2024-08-19 10:28 猝死的路上 阅读(27) 评论(0) 推荐(0) 编辑
摘要:有两种方式 1.基本导出 export const name="zhangsan" export function sum(a,b){ return a+b; } 对应的基本导入 import { name,sum } from './test.js' 直接使用变量名或者函数 或者别名 import 阅读全文
posted @ 2024-06-18 00:17 猝死的路上 阅读(10) 评论(0) 推荐(0) 编辑
摘要:const payPrice= (row.payPrice.toString().split(".")[1] || "").length; const cash= (row.cash.toString().split(".")[1] || "").length; const baseNum = Ma 阅读全文
posted @ 2024-06-14 00:48 猝死的路上 阅读(37) 评论(0) 推荐(0) 编辑
摘要:var precision = 10000; var p1= Math.round(a.payPrice * precision); var p2= Math.round(b.payPrice * precision); return p2- p1; 阅读全文
posted @ 2024-06-14 00:46 猝死的路上 阅读(51) 评论(0) 推荐(0) 编辑
摘要:时间格式为 yyyy-MM-dd HH:mm:ss return Date.parse(a.createTime) - Date.parse(b.createTime); 阅读全文
posted @ 2024-06-14 00:44 猝死的路上 阅读(28) 评论(0) 推荐(0) 编辑

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