这个问题主要出现在我对表格数据进行处理的时候
|| 如果是以||这种写法 要写很长一大段,后面就换了种写法就是下面这个
if (![4, 9, 14, 19].includes(index)) {
noBoder.borderBottom = 'none';
}
这段的意思就是,如果index 不等于4, 9, 14, 19 则noBoder.borderBottom = 'none';
if ([4, 9, 14, 19].includes(index)) {
noBoder.borderBottom = 'none';
}
这是如果index 等于4, 9, 14, 19 则noBoder.borderBottom = 'none';
这样写起来比较简洁一些