小细节 卡卡_罗特 2020-10-13 150 阅读1分钟 split()方法在 vue中报错 解决办法: (item.info || '').split() If 语句 但我经常看到这种情况。 问题 if(value === 'duck' || value === 'dog' || value === 'cat') { // ... } 解决方法 const options = ['duck', 'dog', 'cat']; if (options.includes(value)) { // ... }