04 2021 档案
摘要:function test(a){ a == 1 && a== 2 && a == 3 && console.log('all true') } 此题涉及到引用类型 关羽这知识点建议百度或者看《你不知道的JavaScript》 第一种解题思路是用Object.definedprotype这里不多介绍
阅读全文
摘要:上代码 const arr = [1,2,3,4,5] function t(num) { return new Promise((resolve, reject) => { setTimeout(()=>{ console.log('定时器', num) resolve() }, 1000) })
阅读全文
摘要:先上效果图 需求 粒度—时间选择器联动 时间周期不能大于今天。(所以今天以后的时间都不能选) 周粒度——因为一周没过完,所以不能选当前周 月粒度——因为本月没结束,不能选当前月 切换粒度的时候自动选择最近符合的时间。 侧边有快捷选择。 根据需求还有个隐藏bug 周需要特殊处理选择的日期还有样式 周粒
阅读全文
摘要:先上图 暂时select会有抖动bug。还没发现哪里出问题了 组件代码 <template> <div class="box"> <!-- input输入框 --> <div :class="[search ? 'box-left-search' : 'box-left']" v-if="type
阅读全文
摘要:1、如果有多个条件我们可以在数组中存储多个值,并且可以使用数组include方法。 //longhand if (x 'abc' || x 'def' || x 'ghi' || x 'jkl') { //logic } //shorthand if (['abc', 'def', 'ghi', '
阅读全文

浙公网安备 33010602011771号