vuex.Store 基本屬性介紹

const store = new Vuex.Store({ // 定義的公共變量 state: { count: 1, stu: [{id:1,age:18,name:'dx'},{id:2,age:20,name:'yx'},{id:3,age:100,name:'xx'}] }, // state中的變量只能在mutations中經過方法修改 mut
相關文章
相關標籤/搜索