請問tabs.vue中的todo是從哪來的
請問tabs.vue中的todo是從哪來的?不需要用props傳遞嗎?
computed: {
????unfinishedTodoLength(){
????????return this.todos.filter(todo => !todo.completed).length
????}
},
請問tabs.vue中的todo是從哪來的?不需要用props傳遞嗎?
computed: {
????unfinishedTodoLength(){
????????return this.todos.filter(todo => !todo.completed).length
????}
},
2019-05-15
舉報
2019-05-17
這個 todo 是 filter()函數(shù)中回調(diào)的一個參數(shù)
寫成這樣也是可以的
return this.todos.filter(e => !e.completed).length