UNPKG

quick-admin-vue3-core

Version:

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

92 lines (91 loc) 2.54 kB
import { defineComponent as h, ref as s, resolveComponent as x, createBlock as B, openBlock as C, unref as k } from "vue"; import { u as T, h as a, B as E, i as R } from "./index-C0qRtkRj.js"; import b from "./AddEdit-C4CZGLJC.js"; import { aL as p, q as v, r as y } from "./platform-DsTwHxm6.js"; /* empty css */ import { a as M } from "./_utils-CpYRDY0G.js"; const G = /* @__PURE__ */ h({ name: "CommonCenterRole", __name: "index", setup(g) { const { openPopup: d } = T(), i = s([ { prop: "role", label: "角色类型", type: "select", attrs: { options: "D_RoleType" } }, { tpl: "T_EnableStatus" }, { tpl: "T_CreateTime" } ]), r = s([ { type: "selection" }, { prop: "role_text", label: "角色类型", width: 120 }, { tpl: "T_EnableStatus" }, { tpl: "T_Remark" }, { tpl: "T_Create", sortable: !0 }, { tpl: "T_Update", sortable: !0 } ]); function c(e, t, o) { const { selectedKeys: _ } = o; p( { add: () => l(null, t), delete: () => n(_, t), import: () => m(t), export: () => f(t) // 当handleClickType设为''生效 }, e ); } function u(e, t, o) { p( { edit: () => l(t, o), delete: () => n([t.id], o) }, e ); } function l(e, t) { d(`${e ? "编辑" : "新增"}角色`, [b, { id: e == null ? void 0 : e.id, refreshList: t }]); } function n(e, t) { E({ ids: e }).then((o) => { t(); }); } function m(e) { R({ arr: [ { status: 1, role_text: "12", role: "12", remark: "111" }, { status: 1, role_text: "13", role: "13", remark: "333" } ] }).then((t) => e()); } function f(e) { v("确认导出吗?", "warning", "自定义导出逻辑示例").then(() => { a({ exports: !0 }).then((t) => { y(M(r.value, t)), e(); }); }); } return (e, t) => { const o = x("BaseCrud"); return C(), B(o, { cols: r.value, fields: i.value, fetch: k(a), extraBtns: ["add", "delete", "import", { name: "export", handleClickType: void 0 }], operateBtns: ["edit", "delete"], onExtraBtns: c, onOperateBtns: u }, null, 8, ["cols", "fields", "fetch"]); }; } }); export { G as default };