vuex的流程

這是vuex的關係圖 新建一個文件夾store,再新建一個index.js文件,假設我們在index.js中聲明一個city全局數據,如下圖: 在main.js中引入: 在需要的界面上,使用city這個全局數據: 視圖層(Vue Components)要改變State中的city,就需要通過流程Vue Components--->Actions--->Mutations---->State,所以我
相關文章
相關標籤/搜索