摘要: <view class="icon-item"> <view class="icon-img"> <image :src="`${imgurl}/onlineApplet/applet3/followlist/share.png`"></image> </view> <view class="ico 阅读全文
posted @ 2025-01-23 14:14 烧机 阅读(29) 评论(0) 推荐(0) 编辑
摘要: // 获取下个月的特定一天 getSpecificDayOfNextMonth(day, dayEnd = 0) { let now = new Date(); now.setMonth(now.getMonth() + 1, day); // 设置月份加一,日期设置为特定的一天 if (dayEn 阅读全文
posted @ 2024-12-07 16:33 烧机 阅读(18) 评论(0) 推荐(0) 编辑
摘要: js树型结构数据简易递归 // item内的值根据实际情况更换replaceValueInTree (tree) { const result = [] tree.forEach((item) => { let children = item.children || [] if (Array.isA 阅读全文
posted @ 2024-10-17 17:19 烧机 阅读(37) 评论(0) 推荐(0) 编辑
摘要: // 去除字符串两边的指定字符function strTrim(string, char, type) { if (char) { if (type 'left') { return string.replace(new RegExp('^\\' + char + '+', 'g'), ''); } 阅读全文
posted @ 2024-07-23 14:52 烧机 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 在Vue中,props是一种使用场景广泛的属性。它可以让子组件接收父组件传递的值,从而实现组件之间的通讯。 除了常见的使用props属性来设置值之外,Vue还提供了props多类型支持,这意味着在设置props时,可以定义多种类型,从而为组件开发提供更大的灵活性。 props: { propA: [ 阅读全文
posted @ 2024-05-09 09:33 烧机 阅读(472) 评论(0) 推荐(0) 编辑
摘要: js substr 根据字节长度截取字符串此方法应该还可以被优化一下 /** * 根据字节长度截取字符串 * @param str 字符串 * @param bytesStart 字节截取起始位置 * @param bytesLen 字节截取长度 */substrByBytes(str, bytes 阅读全文
posted @ 2024-03-21 13:49 烧机 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 方法1:把input的 type="password" 改成 type="text" 并在后面加上 οnfοcus="this.type='password'" <input type="text" placeholder="密码" onfocus="this.type='password'"/> 阅读全文
posted @ 2024-02-23 15:34 烧机 阅读(654) 评论(0) 推荐(0) 编辑
摘要: a:要追加的位置 b:要追加的内容 1、append:a.append(b) 将b追加到a的内部的末尾,b是a的子元素 2、appendTo:b.appendTo(a) 将b追加到a的内部的末尾,b是a的子元素 3、prepend:a.prepend(b),将b追加到a的内部的最前面,b是a的子元素 阅读全文
posted @ 2024-02-20 11:18 烧机 阅读(924) 评论(0) 推荐(0) 编辑
摘要: 有时为了格式美观,我们需要给数字统一格式,比如001,002,003,这就有了为数字补足0的需求。具体见代码 // num: 数字 // fill: 补足后的位数 padNumber(num, fill) { let len = ('' + num).length; if (fill > len) 阅读全文
posted @ 2024-01-22 16:27 烧机 阅读(912) 评论(0) 推荐(1) 编辑
摘要: 父级:display: flex left: flex: 0 0 200px(固定200px,不放大也不缩小) right: flex: 1(会随父级变化) (固定+自适应) <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> 阅读全文
posted @ 2023-12-21 17:17 烧机 阅读(124) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示