摘要: mutations中更改 Vuex store 中的state的唯一方法是提交 mutations this.$store.commit('事件名') ///提交方法 在store组件中... mutations: { // 1.先声明要唤醒的函数,并放入ajax方法;此处state就是上边的,这样 阅读全文
posted @ 2021-02-25 22:46 python界泥石流 阅读(64) 评论(0) 推荐(0) 编辑
摘要: vue全家桶:vue + router + vuex构成vue全家桶,更能体现MVVM; M:vuex,管理数据;VM:view-router,路由;V:vue,页面; 1.vuex安装 npm install axios 2.导入 3.axios的get方法获取数据 <template> <div 阅读全文
posted @ 2021-02-25 21:22 python界泥石流 阅读(4225) 评论(0) 推荐(0) 编辑