UNPKG

@mee4dy/crud

Version:

Create a backend and frontend in 5 minutes! With our powerful full stack crud system, customize it to suit you.

41 lines (40 loc) 870 B
import g from "./state.js"; import a from "./getters.js"; import d from "./actions.js"; import f from "./mutations.js"; import * as l from "lodash"; function C(e, t) { const o = (t == null ? void 0 : t.getterData) || "getData", r = (t == null ? void 0 : t.mutationField) || "setDataField"; return { get() { const { getters: i, commit: n } = this.$store, s = i[`${e}/${o}`], c = l.cloneDeep(s); return new Proxy(c, { set(F, u, m) { return n(`${e}/${r}`, { field: u, value: m }), !0; } }); } }; } class R { constructor(t = {}) { this.state = { ...g, ...t }, this.getters = { ...a }, this.actions = { ...d }, this.mutations = { ...f }; } } export { R as CrudStoreForm, C as mapFormData }; //# sourceMappingURL=index.js.map