会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
浮生如梦似离殇
世界上最遥远的距离不是生与死,而是你亲手制造的BUG就在你眼前,你却怎么都找不到她
博客园
首页
新随笔
联系
订阅
管理
2023年4月17日
es6 数组对象求和
摘要: let list = [ { id: 1, price: 2 }, { id: 2, price: 4 }, { id: 3, price: 6 }, { id: 4, price: 8 }, ]; let res= list.reduce((sumData,key,index,arrData)=>
阅读全文
posted @ 2023-04-17 12:47 浮生如梦似离殇
阅读(920)
评论(0)
推荐(0)
2023年1月31日
uniapp 小程序图片放大缩小
摘要: <swiper class="swiper-box" :duration="duration" circular :current="current" @change="changePhotos"> <swiper-item v-for="(item,index) of urls" :key="in
阅读全文
posted @ 2023-01-31 11:58 浮生如梦似离殇
阅读(370)
评论(0)
推荐(0)
uniapp webview中动态设置公众号文章标题不显示问题解决
摘要: 设置在onLoad中可能会引起偶发性无效。解决方案: 1、改写在onReady生命周期中。2、用setTimeout 设置延迟。 onReady() { this.timers=setTimeout(() => { if (this.$Route.query.title) { uni.setNavi
阅读全文
posted @ 2023-01-31 11:01 浮生如梦似离殇
阅读(648)
评论(0)
推荐(0)
2022年12月12日
vue3 封装t点击左右箭头实现内容滑动组件
摘要: 1、组件 <template> <div class="switch-tab"> <div class="switch-tab-left" @click="leftClick"> <el-icon :size="24" color="rgba(99, 149, 255, 1)"><ArrowLeft
阅读全文
posted @ 2022-12-12 14:08 浮生如梦似离殇
阅读(572)
评论(0)
推荐(0)
2022年12月7日
moment.js 获取国内自燃周开始时间与结束时间以及当前日期第几周
摘要: /** * 国内自然周 */ const getWeekOfNature=(date,format)=>{ let weekOfday = moment(date).format("E"); //计算是这周第几天 let monday = moment(date).subtract(weekOfda
阅读全文
posted @ 2022-12-07 13:23 浮生如梦似离殇
阅读(392)
评论(0)
推荐(0)
2022年11月17日
vue3 elementPlus 翻页默认选中
摘要: 1、html <el-table :data="tableData" @selection-change="handleSelectionChange" class="my-table" :row-key="getRowKeys" border v-loading="loading" highlig
阅读全文
posted @ 2022-11-17 16:56 浮生如梦似离殇
阅读(795)
评论(0)
推荐(0)
2022年11月14日
js 数组对象根据多个key值进行分类
摘要: const list = [ { id: 1, name: "手机1", orderNo: "6901443393268", sku: "51095BKR" }, { id: 2, name: "手机2", orderNo: "6901443393262", sku: "51095BBQ" }, {
阅读全文
posted @ 2022-11-14 17:19 浮生如梦似离殇
阅读(1118)
评论(0)
推荐(0)
2022年11月2日
js 下载文件以及自定义下载文件名称
摘要: /** * 下载文件以及自定义文件名称 */ const downFile = (url, fileName) => { const xhr = new XMLHttpRequest(); xhr.open("GET", url, true); xhr.responseType = "blob";
阅读全文
posted @ 2022-11-02 17:25 浮生如梦似离殇
阅读(1441)
评论(0)
推荐(0)
js 找出数组中重复的数字
摘要: let arr = [2, 3, 6, 7, 2, 5, 3]; /** * 找出数组中重复的数字。 * @param {*} arr */ const findRepeatNumber = (arr) => { let map = new Map(); for (let i of arr) { i
阅读全文
posted @ 2022-11-02 09:58 浮生如梦似离殇
阅读(170)
评论(0)
推荐(0)
2022年11月1日
js 数组转树形结构
摘要: 1、递归方式 const list = [ { id: '001', name: '节点1' }, { id: '0011', parentId: '001', name: '节点1-1' }, { id: '00111', parentId: '0011', name: '节点1-1-1' },
阅读全文
posted @ 2022-11-01 16:45 浮生如梦似离殇
阅读(603)
评论(0)
推荐(0)
下一页
公告