UNPKG

quick-admin-vue3-core

Version:

以快(计算机执行效率、开发效率)为核心的后台管理系统开发模板

60 lines (59 loc) 1.7 kB
import { defineComponent as m, resolveComponent as i, createBlock as f, openBlock as u, unref as _ } from "vue"; import { u as h, n as x, w as B } from "./index-C0qRtkRj.js"; import { aL as a } from "./platform-DsTwHxm6.js"; import { _ as C } from "./AddEdit.vue_vue_type_script_setup_true_lang-CN-YmVjN.js"; /* empty css */ const D = /* @__PURE__ */ m({ name: "CommonCenterDictionary", __name: "index", setup(b) { const { openPopup: r } = h(), p = [{ prop: "zdmc", label: "字典名称" }], s = [ { type: "selection" }, { prop: "zdlx", label: "字典类型", minWidth: 210 }, { tpl: "T_Remark" }, { tpl: "T_Create" }, { tpl: "T_Update" } ]; function c(e, t) { a( { add: () => o(null, t) }, e ); } function l(e, t, n) { const { id: d } = t; a( { edit: () => o(t, n), delete: () => B({ id: d }).then(() => n()) }, e ); } function o(e, t) { r(`${e ? "编辑" : "新增"}`, [C, { data: e, refreshList: t }]); } return (e, t) => { const n = i("BaseCrud"); return u(), f(n, { cols: s, fields: p, fetch: _(x), extraBtns: [ "add", { name: "onShelf", text: "上架", batchAble: !0, attrs: { type: "primary" } }, { name: "offShelf", text: "下架", batchAble: !0, attrs: { type: "danger" } } ], operateBtns: ["edit", "delete"], onExtraBtns: c, onOperateBtns: l, index: "" }, null, 8, ["fetch"]); }; } }); export { D as default };