UNPKG

quick-admin-vue3-core

Version:

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

76 lines (75 loc) 2.64 kB
import { defineComponent as T, ref as E, reactive as x, resolveComponent as _, resolveDirective as D, withDirectives as N, createBlock as B, openBlock as i, mergeProps as r, unref as g, withCtx as o, createElementBlock as F, Fragment as H, renderList as L, renderSlot as c, createTextVNode as y, toDisplayString as b, createVNode as O } from "vue"; import { _ as R } from "./Column.vue_vue_type_script_setup_true_lang-CYhJp1rY.js"; import { o as h, g as V, d as I, a as M } from "./_config-BPwT698v.js"; import { h as P } from "./platform-DsTwHxm6.js"; import { _ as j } from "./_plugin-vue_export-helper-CHgC5LLL.js"; const q = /* @__PURE__ */ T({ __name: "BaseTable", props: { cols: { default: () => [] }, data: { default: () => [] }, loading: { type: Boolean }, showSummary: { type: Boolean }, summaryMethod: { type: Function, default: P }, getHandleAuthBtns: {}, operateBtns: { default: () => [] }, operateBtnsAttrs: {} }, emits: [h], setup(v, { expose: $, emit: w }) { const s = v, A = w; s.showSummary; const f = E(), k = x( V(s, (t, n) => { }) ); function C(t, { row: n, col: u, $index: l }, m, d) { const { name: p } = t; A(h, p, { $index: l, ...n }, m, d); } return $({ tableRef: f }), (t, n) => { const u = _("BaseEmpty"), l = _("el-table"), m = D("loading"); return N((i(), B(l, r({ class: "base-table" }, g(I), { data: t.data, ref_key: "tableRef", ref: f }), { empty: o(() => [ O(u) ]), default: o(() => [ (i(!0), F(H, null, L(k, (d, p) => (i(), B(R, { col: d, operateBtnsAttrs: t.operateBtnsAttrs, getBtns: (e, a) => g(M)(e, a, s), onOperateBtns: C, key: p }, { header: o((e) => [ c(t.$slots, "header", r({ ref_for: !0 }, e), () => [ y(b(e.column.label), 1) ], !0) ]), default: o((e) => [ c(t.$slots, "default", r({ ref_for: !0 }, e), () => [ y(b(e.row[e.col.prop]), 1) ], !0) ]), custom: o(({ row: e, col: a, $index: S }) => [ c(t.$slots, a.prop, r({ ref_for: !0 }, { row: e, col: a, $index: S }), void 0, !0) ]), _: 2 }, 1032, ["col", "operateBtnsAttrs", "getBtns"]))), 128)) ]), _: 3 }, 16, ["data"])), [ [m, t.loading] ]); }; } }), U = /* @__PURE__ */ j(q, [["__scopeId", "data-v-84ab1d3e"]]); export { U as default };