model.js 343 B

123456789101112131415161718
  1. import { commServer } from './server.js';
  2. export default {
  3. namespaced: true,
  4. state: {
  5. templateData:null,//新增访查对象模板
  6. },
  7. mutations: {
  8. comChangeState(state, {key, data}) {
  9. state[key] = data;
  10. },
  11. },
  12. actions: {
  13. commActions({ commit, state }, { key, data }) {
  14. return commServer(key, data);
  15. },
  16. }
  17. }