vue中映射store中的數據和方法--雙向綁定

mapState和mapMutations的寫法:        組件使用store中的數據和方法,實現雙向綁定 1.:value=「inputValue」 對應的是v-model的寫法,綁定的是store中的數據; 2.通過@input事件觸發changeInputValue,e.target.value,調動mutation中的對應函數,刷新數據,實現inputValue值的雙向綁定
相關文章
相關標籤/搜索