vue組件中的一個計算屬性code,依賴另一個計算屬性projectPath(該屬性只有數(shù)組或者undefined兩種值),但是在code的計算函數(shù)中調(diào)用map,卻報TypeError: this.projectPath.map(...) is not a function這是什么道理???代碼: code () { if (this.projectPath) { console.log(typeof this.projectPath.map) let list = this.projectPath.map(item => item.nodeCode) return list.join('_')
} return undefined
},報錯:
添加回答
舉報
0/150
提交
取消