vue.js中的子組件與父組件,prop傳遞數據

組件實例的做用域是孤立的。不能 在子組件的模板內直接引用父組件的數據。須要經過子組件的 props 選項顯式聲明子組件的數據: 子組件與父組件的關係:javascript <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Prop</title> <script src="vue.js
相關文章
相關標籤/搜索