2022年2月14日

vuex(7)

摘要: vuex示例: app.ts export interface StateProps { visitedViews: Array<view> }export interface view { path: string, name: string} const state = { visitedVie 阅读全文

posted @ 2022-02-14 12:15 zhishiyv 阅读(30) 评论(0) 推荐(0) 编辑

vuex (6)

摘要: Module 由于使用单一状态树,应用的所有状态会集中到一个比较大的对象。当应用变得非常复杂时, store对象就有可能变得相当臃肿。 为了解决以上问题,Vuex允许我们将store分割成模块( module )。 每个模块拥有自己的 state、mutation、 action、 getter 甚 阅读全文

posted @ 2022-02-14 12:13 zhishiyv 阅读(28) 评论(0) 推荐(0) 编辑

导航