UNPKG

quick-admin-vue3-core

Version:

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

106 lines (105 loc) 3.33 kB
import { defineComponent as B, mergeDefaults as y, ref as P, resolveComponent as p, createElementBlock as T, openBlock as u, Fragment as k, createBlock as U, createElementVNode as z, withCtx as i, createVNode as a, mergeProps as d } from "vue"; import { c as I, b as h } from "./platform-DsTwHxm6.js"; import { _ as N } from "./_plugin-vue_export-helper-CHgC5LLL.js"; const S = { class: "f-c-c mt-16" }; var _, C; const D = /* @__PURE__ */ B({ __name: "SetTable", props: /* @__PURE__ */ y({ rows: {}, size: {} }, { rows: () => [], ...(C = (_ = I) == null ? void 0 : _.BaseCrud) == null ? void 0 : C.SetTable }), emits: ["change", "reset", "submit"], setup(E, { emit: f }) { const n = { inlinePrompt: !0, activeText: "是", inactiveText: "否" }, s = f, g = P(Date.now()), V = [ { prop: "label", label: "列名", minWidth: 110 }, { prop: "visible", label: "是否显示", width: 80, type: "slot" }, { prop: "sortable", label: "是否排序", width: 80, type: "slot" }, { prop: "exportable", label: "能否导出", width: 80, type: "slot" } ]; function r(t) { s("change", t); } function w(...t) { h("保存成功"), s("submit", ...t); } function v(...t) { h("已重置"), s("reset", ...t); } return (t, A) => { const c = p("el-switch"), x = p("BaseTable"), m = p("BaseBtn"); return u(), T(k, null, [ (u(), U(x, { style: { width: "400px" }, cols: V, rowClassName: ({ row: e }) => e.hidden ? "hidden-row" : "", data: t.rows, size: t.size, key: g.value }, { visible: i(({ row: e, col: b, $index: l }) => [ a(c, d({ onChange: (o) => r({ type: "visible", colProp: e.colProp, isTrue: o, rowInd: l }), modelValue: e.visible, "onUpdate:modelValue": (o) => e.visible = o }, n), null, 16, ["onChange", "modelValue", "onUpdate:modelValue"]) ]), exportable: i(({ row: e, col: b, $index: l }) => [ a(c, d({ onChange: (o) => r({ type: "exportable", colProp: e.colProp, isTrue: o, rowInd: l }), modelValue: e.exportable, "onUpdate:modelValue": (o) => e.exportable = o }, n), null, 16, ["onChange", "modelValue", "onUpdate:modelValue"]) ]), sortable: i(({ row: e, col: b, $index: l }) => [ a(c, d({ onChange: (o) => r({ type: "sortable", colProp: e.colProp, isTrue: o, rowInd: l }), modelValue: e.sortable, "onUpdate:modelValue": (o) => e.sortable = o }, n), null, 16, ["onChange", "modelValue", "onUpdate:modelValue"]) ]), _: 1 }, 8, ["rowClassName", "data", "size"])), z("div", S, [ a(m, { onClick: w, tpl: { name: "submit", text: "保存" } }), a(m, { onClick: v, tpl: "reset" }) ]) ], 64); }; } }), R = /* @__PURE__ */ N(D, [["__scopeId", "data-v-696cb2cd"]]); export { R as default };