可以在任何的子組件中使用 $root 取得根實體,如下例所示: Vue.component('first-layer', { template: `<div> I am First Layer. $root.a: {{$root.a}} <button ...
確定! 回上一頁