為什么可以在tabs組件里使用todo?
computed: {
? ?unFinishedTodoLength() {
? ? ?return this.todos.filter(todo => !todo.completed).length
? ?}
并沒有向tabs組件傳入todo,為什么可以使用
computed: {
? ?unFinishedTodoLength() {
? ? ?return this.todos.filter(todo => !todo.completed).length
? ?}
并沒有向tabs組件傳入todo,為什么可以使用
2018-03-06
舉報
2018-06-11
在父組件todo.vue中:
在子組件todo.vue中:
2018-03-06
父組件prop數(shù)據(jù)到子組件