vue—你必須知道的

  更多總結 猛戳這裏 屬性與方法 不要在實例屬性或者回調函數中(例如,vm.$watch('a', newVal => this.myMethod())使用箭頭函數。由於箭頭函數會綁定父級上下文,因此 this 不會按照預期指向 Vue 實例,而後 this.myMethod 將是未定義。javascript 語法 v- 指令是帶有v-的特殊屬性 v-if 條件渲染 v-show v-else
相關文章
相關標籤/搜索