vue 在js 文件中使用store_成功vue js文件获取store数据
js文件import store from "@/store";let mm =store.state.patient.OperateModel;store/patient.jsconst state = {name: 'hahhaxx',LZBaseSession: [],OperateModel:'x',//当前操作,主要用于识别顶部导航样本入库和统计查询}const mutations =
·
js文件
import store from "@/store";
let mm =store.state.patient.OperateModel;
store/patient.js
const state = {
name: 'hahhaxx',
LZBaseSession: [],
OperateModel:'x',//当前操作,主要用于识别顶部导航样本入库和统计查询
}
const mutations = {
SET_NAME: (state, name) => {
state.name = name
},
SET_LZBase: (state, LZBaseSession) => {
state.LZBaseSession = LZBaseSession;
},
SET_OperateModel: (state, OperateModel) => {
state.OperateModel = OperateModel;
}
}
export default {
namespaced: true,
state,
mutations
}
更多推荐
已为社区贡献1条内容
所有评论(0)