model.js 293 B

1234567891011121314151617
  1. import { commServer } from './server.js';
  2. export default {
  3. namespaced: true,
  4. state: {
  5. },
  6. mutations: {
  7. comChangeState(state, {key, data}) {
  8. state[key] = data;
  9. },
  10. },
  11. actions: {
  12. commActions({ commit, state }, { key, data }) {
  13. return commServer(key, data);
  14. },
  15. }
  16. }