会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
波西米亚
博客园
首页
新随笔
联系
管理
2025年1月23日
uniapp小程序自定义分享按钮
摘要: <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 烧机
阅读(95)
评论(0)
推荐(0)
2024年12月7日
JS时间操作
摘要: // 获取下个月的特定一天 getSpecificDayOfNextMonth(day, dayEnd = 0) { let now = new Date(); now.setMonth(now.getMonth() + 1, day); // 设置月份加一,日期设置为特定的一天 if (dayEn
阅读全文
posted @ 2024-12-07 16:33 烧机
阅读(22)
评论(0)
推荐(0)
2024年10月17日
JS 树型结构数据简易递归
摘要: js树型结构数据简易递归 // item内的值根据实际情况更换replaceValueInTree (tree) { const result = [] tree.forEach((item) => { let children = item.children || [] if (Array.isA
阅读全文
posted @ 2024-10-17 17:19 烧机
阅读(50)
评论(0)
推荐(0)
2024年7月23日
JS trim方法改造
摘要: // 去除字符串两边的指定字符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)
2024年5月9日
Vue子组件props多类型
摘要: 在Vue中,props是一种使用场景广泛的属性。它可以让子组件接收父组件传递的值,从而实现组件之间的通讯。 除了常见的使用props属性来设置值之外,Vue还提供了props多类型支持,这意味着在设置props时,可以定义多种类型,从而为组件开发提供更大的灵活性。 props: { propA: [
阅读全文
posted @ 2024-05-09 09:33 烧机
阅读(562)
评论(0)
推荐(0)
2024年3月21日
JS substr 根据字节长度截取字符串
摘要: js substr 根据字节长度截取字符串此方法应该还可以被优化一下 /** * 根据字节长度截取字符串 * @param str 字符串 * @param bytesStart 字节截取起始位置 * @param bytesLen 字节截取长度 */substrByBytes(str, bytes
阅读全文
posted @ 2024-03-21 13:49 烧机
阅读(121)
评论(0)
推荐(0)
2024年2月23日
HTML 阻止浏览器自动填充input密码框
摘要: 方法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 烧机
阅读(707)
评论(0)
推荐(0)
2024年2月20日
JS中几种追加元素的方法
摘要: 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 烧机
阅读(1031)
评论(0)
推荐(0)
2024年1月22日
JS 数字字符串补零
摘要: 有时为了格式美观,我们需要给数字统一格式,比如001,002,003,这就有了为数字补足0的需求。具体见代码 // num: 数字 // fill: 补足后的位数 padNumber(num, fill) { let len = ('' + num).length; if (fill > len)
阅读全文
posted @ 2024-01-22 16:27 烧机
阅读(1011)
评论(0)
推荐(1)
2023年12月21日
CSS dispaly: flex—左右两栏式
摘要: 父级: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 烧机
阅读(156)
评论(0)
推荐(0)
下一页
公告