上一页 1 2 3 4 5 6 ··· 21 下一页
摘要: // 身份证号function isIdCard(str) { return /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(str); } // 阅读全文
posted @ 2023-07-07 09:18 Panax 阅读(9) 评论(0) 推荐(0) 编辑
摘要: // 可被用来过渡的background-color background-position border-color border-width border-spacing bottom color font-size font-weight height left letter-spacing 阅读全文
posted @ 2023-07-07 09:10 Panax 阅读(1) 评论(0) 推荐(0) 编辑
摘要: animation-name: myanimation; // 动画名字,指定关键帧的名字。 animation-duration: 4s; // 动画持续时间,间接控制速率,越长越慢! animation-iteration-count: infinite; // 重复次数,可以填数字也可以填in 阅读全文
posted @ 2023-07-07 09:00 Panax 阅读(1) 评论(0) 推荐(0) 编辑
摘要: HTML部分 <body> <div class="box"></div> </body> css部分 // 设置背景颜色 body { background: #333; } .box { background: #fff; // 设置显眼的颜色 width: 200px; // 固定宽,为了看的 阅读全文
posted @ 2023-07-07 08:55 Panax 阅读(1) 评论(0) 推荐(0) 编辑
摘要: // 单行显示.oneline { overflow: hidden; word-break: break-all; text-overflow: ellipsis; -webkit-box-orient: horizontal; -webkit-line-clamp: 1; line-clamp: 阅读全文
posted @ 2023-07-07 08:36 Panax 阅读(4) 评论(0) 推荐(0) 编辑
摘要: /** * 获取地图上两点间距离。单位:米 * @param {lat1} 第一个点的纬度 * @param {lon1} 第一个点的经度 * @param {lat2} 第二个点的纬度 * @param {lon2} 第二个点的经度 * @author 人参 */ export function 阅读全文
posted @ 2023-07-06 15:37 Panax 阅读(4) 评论(0) 推荐(0) 编辑
摘要: /** * 节流 * 在给定时间内只有第一次的操作会返回结果 * 结合了防抖的思路:在delay时间内生成定时器,一旦到了delay的时间就返回结果 * 当用户只点击了一次的时候,在delay时间后得到结果 * 当用户点击了多次的时候,在delay时间后得到第一次的结果,其余的被节流阀忽视掉 * @ 阅读全文
posted @ 2023-07-06 14:39 Panax 阅读(11) 评论(0) 推荐(0) 编辑
摘要: export function verifyNull(data){ if(data '' || data 'undefined' || data 'null' || data null || (typeof(data) 'string' && data.trim() '') || JSON.stri 阅读全文
posted @ 2023-03-09 09:12 Panax 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 主要思路 1. 先对当天缓存 2. 再次点击或者获取的时候进行对比 // 是否当前日期 isDay(){ // 测试 // let newDay = (new Date()).getMinutes(); let newDay = (new Date()).getDate(); // 今天 let l 阅读全文
posted @ 2023-01-18 13:09 Panax 阅读(150) 评论(0) 推荐(0) 编辑
摘要: const moment = require('./moment.min.js') module.exports = { formateDate: function (time, fmt = 'yyyy-MM-dd hh:mm:ss') { let _this = new Date(time) le 阅读全文
posted @ 2022-11-16 11:30 Panax 阅读(111) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 21 下一页