2023年6月1日

JS系列--【获取某一时间的前一个工作日】

摘要: 方式一:通过计算时间戳 // 1.获取前一天日期(排除周六、周日) getPrevBusinessDay(date) { const dayOfWeek = date.getDay(); if (dayOfWeek 1) { // 星期一 return new Date(date.getTime() 阅读全文

posted @ 2023-06-01 22:00 码农小小海 阅读(215) 评论(0) 推荐(0) 编辑

vue系列---【vue 使用decimal.js 解决小数相加合计精确度丢失问题】

摘要: 1. 使用 npm 安装 decimal.js 库 ```vue npm install decimal.js ``` 2.在 Vue 组件中引入该库 ```vue import Decimal from 'decimal.js'; ``` 3.使用示例 ```vue footerMethod({c 阅读全文

posted @ 2023-06-01 21:45 码农小小海 阅读(2043) 评论(0) 推荐(0) 编辑

导航