08 2023 档案
摘要:原因:跳转到未渲染过的页面时,页面还没渲染就进行赋值操作,所以赋值不上去。 如果往后跳转,可以使用 uni.$emit和uni.$on页面传值。即uni.navigateBack({delta:1}),尽量不要使用uni.navigateTo(会造成页面重叠)。 能够接收到数据并赋值。 解决办法:使
阅读全文
摘要:deep(data){ data.forEach(item=>{ console.log(item) if(item.children){ this.deep(item.children) } if(!item.children||!item.children.length||item.childr
阅读全文
摘要:computed: { _searchForm () { return JSON.parse(JSON.stringify(this.searchForm)) }},watch: { _searchForm: { handler: function (newVal, oldVal) { if (ne
阅读全文
摘要:duration (val) { let h = parseInt(val / 60 / 60 % 24) h = h < 10 ? '0' + h : h let m = parseInt(val / 60 % 60) m = m < 10 ? '0' + m : m let s = parseI
阅读全文
摘要:const arr = [ { label: '2', value: '2' }, { label: '1', value: '1' }, { label: '3', value: '3' } ] // 把value=1和value=2的数据筛掉 let newArr = arr.filter(op
阅读全文