課程
/前端開發(fā)
/Vue.js
/vue2.5入門
子組件不能拿到for的key屬性值嗎
2019-05-24
源自:vue2.5入門 3-4
正在回答
試過,拿不到
[Vue warn]: "key" is a reserved attribute and cannot be used as component prop.
found in
---> <TodoItem> at src/components/TodoItem.vue
? ? ? ?<TodoList> at src/TodoList.vue
? ? ? ? ?<Root>
舉報
快速理解Vue編程理念上手Vue2.0開發(fā)。
2 回答v-for中為什么要綁定key屬性
4 回答為什么不能直接傳遞屬性key
2 回答子組件為什么向外傳遞出delete事件,同時傳出本身的index值,是父組件的index屬性接受嗎
5 回答key不能在子組件直接傳過去嗎,需要新加一個index,key具體是用來做什么的?
2 回答子組件向父組件傳值問題
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學習伙伴
掃描二維碼關注慕課網(wǎng)微信公眾號
2019-05-25
試過,拿不到
[Vue warn]: "key" is a reserved attribute and cannot be used as component prop.
found in
---> <TodoItem> at src/components/TodoItem.vue
? ? ? ?<TodoList> at src/TodoList.vue
? ? ? ? ?<Root>