vue-admin-better/src/store/modules/table.js

22 lines
467 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* @author chuzhixin 1204505056@qq.com 不想保留author可删除
* @description 代码生成机状态管理
*/
const state = { srcCode: "" };
const getters = {
srcTableCode: (state) => state.srcCode,
};
const mutations = {
setTableCode(state, srcCode) {
state.srcCode = srcCode;
},
};
const actions = {
setTableCode({ commit }, srcCode) {
commit("setTableCode", srcCode);
},
};
export default { state, getters, mutations, actions };