china-mobile-international-custom-components 0.0.33 → 0.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,21 +1,21 @@
1
- import { w as ve } from "./chunks/index.bCzIhWFw.js";
2
- import { ref as g, useSlots as ye, computed as A, watch as L, onMounted as he, createElementBlock as m, openBlock as o, createCommentVNode as v, createElementVNode as C, renderSlot as x, createVNode as k, unref as r, withCtx as u, createBlock as c, resolveDynamicComponent as be, toDisplayString as D, normalizeClass as G, mergeProps as J, toHandlers as ke, createSlots as Q, Fragment as R, renderList as N, createTextVNode as X, normalizeProps as Se, guardReactiveProps as we } from "vue";
3
- import { C as _ } from "./chunks/layout.CWL6NVjA.js";
4
- import { SearchBar as Ce } from "color-star-custom-components";
5
- import { IconZuo as xe, IconMore as Ee, IconZuoCopy as ze, IconYou as Ie } from "color-message-aibox-vue";
6
- import { emitsMap as f, paginationConfig as O, pageParams as I, operationConfigMap as ee } from "color-star-custom-methods";
7
- import { ElIcon as W, ElTable as Pe, ElTableColumn as U, ElButton as Ae, ElDropdown as Ne, ElDropdownMenu as De, ElDropdownItem as Re, ElScrollbar as Oe, ElPagination as Te } from "element-plus";
8
- import { useRouter as Be } from "vue-router";
9
- import { _ as Ve } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
10
- import './assets/PageContainer.css';const te = {
1
+ import { w as he } from "./chunks/index.bCzIhWFw.js";
2
+ import { ref as g, useSlots as be, computed as N, watch as K, onMounted as ke, resolveComponent as we, createElementBlock as v, openBlock as r, createCommentVNode as y, createElementVNode as S, renderSlot as E, createVNode as h, unref as i, withCtx as u, createBlock as p, resolveDynamicComponent as Se, toDisplayString as D, normalizeClass as Q, mergeProps as X, toHandlers as Ce, createSlots as _, normalizeStyle as xe, Fragment as O, renderList as R, createTextVNode as ee, normalizeProps as Ee, guardReactiveProps as ze } from "vue";
3
+ import { C as te } from "./chunks/layout.CWL6NVjA.js";
4
+ import { SearchBar as Pe } from "color-star-custom-components";
5
+ import { IconZuo as Ae, IconMore as Ie, IconZuoCopy as Ne, IconYou as Re } from "color-message-aibox-vue";
6
+ import { emitsMap as d, paginationConfig as T, pageParams as A, operationConfigMap as ae } from "color-star-custom-methods";
7
+ import { ElIcon as U, ElTable as De, ElTableColumn as H, ElButton as Oe, ElDropdown as Te, ElDropdownMenu as Be, ElDropdownItem as Ve, ElScrollbar as $e, ElPagination as je } from "element-plus";
8
+ import { useRouter as Fe } from "vue-router";
9
+ import { _ as Me } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
10
+ import './assets/PageContainer.css';const le = {
11
11
  ACTION: "action"
12
- }, P = {
12
+ }, I = {
13
13
  TABLE: "table",
14
14
  CARD_INFINITE: "card-infinite"
15
- }, $e = { class: "page-container flex flex-col overflow-hidden h-full" }, je = { class: "text-1f2329 pd-l-4" }, Fe = { class: "action-buttons flex items-center" }, Me = { class: "flex items-center w-full" }, Le = { class: "flex-1" }, We = { class: "card-list" }, Ue = {
15
+ }, Le = { class: "page-container flex flex-col overflow-hidden h-full" }, We = { class: "text-1f2329 pd-l-4" }, Ke = { class: "action-buttons flex items-center" }, Ue = { class: "flex items-center w-full" }, He = { class: "flex-1" }, Ye = { class: "card-list" }, Ze = {
16
16
  key: 3,
17
17
  class: "pagination-section pd-t-16 flex justify-center"
18
- }, Ke = /* @__PURE__ */ Object.assign({
18
+ }, qe = /* @__PURE__ */ Object.assign({
19
19
  name: "PageContainer"
20
20
  }, {
21
21
  __name: "layout",
@@ -81,11 +81,11 @@ import './assets/PageContainer.css';const te = {
81
81
  pagination: {
82
82
  type: Object,
83
83
  default: () => ({
84
- page: I.pageNum,
85
- size: I.pageSize,
84
+ page: A.pageNum,
85
+ size: A.pageSize,
86
86
  total: 0,
87
- pageSizes: O.pageSizes,
88
- layout: O.layout
87
+ pageSizes: T.pageSizes,
88
+ layout: T.layout
89
89
  })
90
90
  },
91
91
  // 自定义插槽名称列表
@@ -120,8 +120,8 @@ import './assets/PageContainer.css';const te = {
120
120
  // 显示模式:MODES.TABLE(表格) | MODES.CARD_INFINITE(无限滚动卡片)
121
121
  mode: {
122
122
  type: String,
123
- default: P.TABLE,
124
- validator: (l) => Object.values(P).includes(l)
123
+ default: I.TABLE,
124
+ validator: (a) => Object.values(I).includes(a)
125
125
  },
126
126
  // 是否显示复选框
127
127
  showSelection: {
@@ -140,129 +140,129 @@ import './assets/PageContainer.css';const te = {
140
140
  }
141
141
  },
142
142
  emits: [
143
- f.search,
144
- f.reset,
145
- f.actionClick,
146
- f.paginationChange,
147
- f.sizeChange,
148
- f.dataLoaded,
149
- f.dataError,
150
- f.updateModelValue,
143
+ d.search,
144
+ d.reset,
145
+ d.actionClick,
146
+ d.paginationChange,
147
+ d.sizeChange,
148
+ d.dataLoaded,
149
+ d.dataError,
150
+ d.updateModelValue,
151
151
  "selection-change"
152
152
  ],
153
- setup(l, { expose: ae, emit: le }) {
154
- const ne = Be(), n = l, S = le, oe = g(null), T = g(null), re = g(null), ie = ye(), B = g(!1), y = g([]), h = g({
155
- page: I.pageNum,
156
- size: I.pageSize,
153
+ setup(a, { expose: ne, emit: oe }) {
154
+ const re = Fe(), n = a, C = oe, ie = g(null), B = g(null), se = g(null), ue = be(), V = g(!1), b = g([]), k = g({
155
+ page: A.pageNum,
156
+ size: A.pageSize,
157
157
  total: 0,
158
- pageSizes: O.pageSizes,
159
- layout: O.layout
160
- }), b = g({ ...n.modelValue }), E = g(!1), z = g(!0), V = g([...n.selection]), $ = A(
161
- () => n.api ? y.value : n.tableData
162
- ), p = A(
163
- () => n.api ? h.value : n.pagination
164
- ), j = A(
165
- () => n.api ? B.value || E.value : n.tableProps.loading || E.value || !1
166
- ), F = A(() => n.mode === P.CARD_INFINITE), K = A(() => n.columns?.map((e) => {
167
- if (e.type === te.ACTION && (Array.isArray(e.actions) || typeof e.actions == "function"))
158
+ pageSizes: T.pageSizes,
159
+ layout: T.layout
160
+ }), w = g({ ...n.modelValue }), z = g(!1), P = g(!0), $ = g([...n.selection]), j = N(
161
+ () => n.api ? b.value : n.tableData
162
+ ), m = N(
163
+ () => n.api ? k.value : n.pagination
164
+ ), F = N(
165
+ () => n.api ? V.value || z.value : n.tableProps.loading || z.value || !1
166
+ ), M = N(() => n.mode === I.CARD_INFINITE), Y = N(() => n.columns?.map((e) => {
167
+ if (e.type === le.ACTION && (Array.isArray(e.actions) || typeof e.actions == "function"))
168
168
  return {
169
169
  ...e,
170
170
  align: "center",
171
171
  fixed: "right"
172
172
  };
173
- const { width: a, ...t } = e;
173
+ const { width: t, ...c } = e;
174
174
  return {
175
- ...t,
176
- minWidth: a
175
+ ...c,
176
+ minWidth: t
177
177
  };
178
- })), se = (e) => {
179
- !F.value || !z.value || j.value || w({}, !0);
180
- }, de = (e, a) => e.id || e.bnid || e.key || `item-${a}`, ue = () => {
181
- ne.back();
182
- }, fe = (e, a) => a.formatter ? a.formatter(e[a.prop], e, a) : e[a.prop], ce = (e) => ie[e] !== void 0, M = (e, a) => typeof e.actions == "function" ? e.actions(a) || [] : e.actions || [], pe = (e) => e.length < 3 ? e : e.slice(0, 1), H = (e) => e.length < 3 ? [] : e.slice(1), w = (e = {}, a = !1) => {
178
+ })), de = (e) => {
179
+ !M.value || !P.value || F.value || x({}, !0);
180
+ }, fe = (e, t) => e.id || e.bnid || e.key || `item-${t}`, ce = () => {
181
+ re.back();
182
+ }, pe = (e, t) => t.formatter ? t.formatter(e[t.prop], e, t) : e[t.prop], me = (e) => ue[e] !== void 0, L = (e, t) => typeof e.actions == "function" ? e.actions(t) || [] : e.actions || [], ge = (e) => e.length < 3 ? e : e.slice(0, 1), Z = (e) => e.length < 3 ? [] : e.slice(1), x = (e = {}, t = !1) => {
183
183
  if (!n.api) return;
184
- if (a) {
185
- if (!z.value || E.value) return;
186
- E.value = !0;
184
+ if (t) {
185
+ if (!P.value || z.value) return;
186
+ z.value = !0;
187
187
  } else
188
- B.value = !0, F.value && (z.value = !0, E.value = !1);
189
- const t = {
188
+ V.value = !0, M.value && (P.value = !0, z.value = !1);
189
+ const c = {
190
190
  ...e,
191
191
  // 搜索参数等
192
192
  ...n.apiParams,
193
- ...b.value
193
+ ...w.value
194
194
  };
195
- n.showPagination && (a ? t.page = p.value.page + 1 : t.page = p.value.page, t.size = p.value.size), n.api(t).then((d) => {
196
- const i = d?.data?.memberSo?.data || d?.data?.data || d?.data || [];
197
- if (a) {
198
- if (!i || i.length === 0) {
199
- z.value = !1;
195
+ n.showPagination && (t ? c.page = m.value.page + 1 : c.page = m.value.page, c.size = m.value.size), n.api(c).then((o) => {
196
+ const l = o?.data?.memberSo?.data || o?.data?.data || o?.data || [];
197
+ if (t) {
198
+ if (!l || l.length === 0) {
199
+ P.value = !1;
200
200
  return;
201
201
  }
202
- y.value = [...y.value, ...i], h.value.page = t.page, h.value.total = d?.data?.memberSo?.total || d?.data?.total || y.value.length, i.length < p.value.size && (z.value = !1);
202
+ b.value = [...b.value, ...l], k.value.page = c.page, k.value.total = o?.data?.memberSo?.total || o?.data?.total || b.value.length, l.length < m.value.size && (P.value = !1);
203
203
  } else
204
- y.value = i, h.value.total = d?.data?.memberSo?.total || d?.data?.total || 0;
205
- S(f.dataLoaded, {
206
- data: y.value,
207
- pagination: h.value,
208
- params: t,
209
- response: d?.data,
210
- isLoadMore: a
204
+ console.log("newData", l), b.value = l, k.value.total = o?.data?.memberSo?.total || o?.data?.total || 0;
205
+ C(d.dataLoaded, {
206
+ data: b.value,
207
+ pagination: k.value,
208
+ params: c,
209
+ response: o?.data,
210
+ isLoadMore: t
211
211
  });
212
- }).catch((d) => {
213
- a ? z.value = !1 : (y.value = [], h.value.total = 0), S(f.dataError, d);
212
+ }).catch((o) => {
213
+ t ? P.value = !1 : (b.value = [], k.value.total = 0), C(d.dataError, o);
214
214
  }).finally(() => {
215
- a ? E.value = !1 : B.value = !1;
215
+ t ? z.value = !1 : V.value = !1;
216
216
  });
217
- }, Y = () => {
218
- n.api ? (h.value.page = I.pageNum, w()) : S(f.search, b.value);
219
- }, Z = () => {
217
+ }, q = () => {
218
+ n.api ? (k.value.page = A.pageNum, x()) : C(d.search, w.value);
219
+ }, G = () => {
220
220
  const e = {};
221
- Object.keys(b.value).forEach((a) => {
222
- e[a] = void 0;
223
- }), b.value = e, n.api ? (h.value.page = I.pageNum, w()) : S(f.reset);
224
- }, q = (e, a, t) => {
225
- S(f.actionClick, { action: e, row: a, index: t });
226
- }, ge = (e) => {
227
- V.value = e, S("selection-change", e);
228
- }, me = (e, a) => {
229
- switch (n.mode === P.CARD_INFINITE && (y.value = []), e) {
230
- case ee.search:
231
- Y();
221
+ Object.keys(w.value).forEach((t) => {
222
+ e[t] = void 0;
223
+ }), w.value = e, n.api ? (k.value.page = A.pageNum, x()) : C(d.reset);
224
+ }, J = (e, t, c) => {
225
+ C(d.actionClick, { action: e, row: t, index: c });
226
+ }, ve = (e) => {
227
+ $.value = e, C("selection-change", e);
228
+ }, ye = (e, t) => {
229
+ switch (n.mode === I.CARD_INFINITE && (b.value = []), e) {
230
+ case ae.search:
231
+ q();
232
232
  break;
233
- case ee.reset:
234
- Z();
233
+ case ae.reset:
234
+ G();
235
235
  break;
236
236
  }
237
237
  };
238
- return L(
238
+ return K(
239
239
  () => n.modelValue,
240
240
  (e) => {
241
- b.value = { ...e };
241
+ w.value = { ...e };
242
242
  },
243
243
  { deep: !0, immediate: !0 }
244
- ), L(
244
+ ), K(
245
245
  () => n.selection,
246
246
  (e) => {
247
- V.value = [...e];
247
+ $.value = [...e];
248
248
  },
249
249
  { deep: !0, immediate: !0 }
250
- ), L(
251
- () => b.value,
250
+ ), K(
251
+ () => w.value,
252
252
  (e) => {
253
- S(f.updateModelValue, { ...e });
253
+ C(d.updateModelValue, { ...e });
254
254
  },
255
255
  { deep: !0 }
256
- ), he(() => {
257
- n.autoLoad && n.api && w();
258
- }), ae({
259
- loadData: w,
260
- handleSearch: Y,
261
- handleReset: Z,
256
+ ), ke(() => {
257
+ n.autoLoad && n.api && x();
258
+ }), ne({
259
+ loadData: x,
260
+ handleSearch: q,
261
+ handleReset: G,
262
262
  // 复选框相关方法
263
- clearSelection: () => T.value?.clearSelection?.(),
264
- toggleAllSelection: () => T.value?.toggleAllSelection?.(),
265
- getSelectionRows: () => V.value
263
+ clearSelection: () => B.value?.clearSelection?.(),
264
+ toggleAllSelection: () => B.value?.toggleAllSelection?.(),
265
+ getSelectionRows: () => $.value
266
266
  // SearchBar相关方法
267
267
  // validate: () => searchFormRef.value?.validate?.(),
268
268
  // getFormData: () =>
@@ -274,237 +274,253 @@ import './assets/PageContainer.css';const te = {
274
274
  // handleReset()
275
275
  // }
276
276
  // },
277
- }), (e, a) => (o(), m("div", $e, [
278
- l.breadcrumb.show ? (o(), m("div", {
279
- key: 0,
280
- class: "flex items-center fz-14 pd-b-20 pointer",
281
- onClick: ue
282
- }, [
283
- k(r(W), { size: 16 }, {
284
- default: u(() => [
285
- (o(), c(be(l.breadcrumb.icon || r(xe))))
286
- ]),
287
- _: 1
288
- }),
289
- C("span", je, D(l.breadcrumb.text), 1)
290
- ])) : v("", !0),
291
- l.searchFields?.length ? (o(), m("div", {
292
- key: 1,
293
- class: G({
294
- "search-section pd-b-12 mg-b-12": !l.isSeparate,
295
- "bg-fff radius-4 pd-l-16 pd-r-16 pd-t-16 pd-b-16": l.isSeparate
296
- })
297
- }, [
298
- k(_, { title: "查询" }),
299
- k(r(Ce), {
300
- ref_key: "searchFormRef",
301
- ref: oe,
302
- items: l.searchFields,
303
- "filter-mode": !1,
304
- minWidth: l.minWidth,
305
- hideExpandButton: !1,
306
- fixedWidth: !0,
307
- maxHeight: 32,
308
- modelValue: b.value,
309
- "onUpdate:modelValue": a[0] || (a[0] = (t) => b.value = t),
310
- onOperation: me
311
- }, null, 8, ["items", "minWidth", "modelValue"])
312
- ], 2)) : v("", !0),
313
- C("div", {
314
- class: G(["data-section flex-1 overflow-hidden flex flex-col", {
315
- "bg-fff radius-4 pd-l-16 pd-r-16 pd-t-16 pd-b-16 mg-t-16": l.isSeparate
316
- }])
317
- }, [
318
- l.title ? x(e.$slots, "title", { key: 0 }, () => [
319
- k(_, { title: l.title }, {
277
+ }), (e, t) => {
278
+ const c = we("ElAutoResizer");
279
+ return r(), v("div", Le, [
280
+ a.breadcrumb.show ? (r(), v("div", {
281
+ key: 0,
282
+ class: "flex items-center fz-14 pd-b-20 pointer",
283
+ onClick: ce
284
+ }, [
285
+ h(i(U), { size: 16 }, {
320
286
  default: u(() => [
321
- x(e.$slots, "title-actions", {}, void 0, !0)
287
+ (r(), p(Se(a.breadcrumb.icon || i(Ae))))
322
288
  ]),
323
- _: 3
324
- }, 8, ["title"])
325
- ], !0) : v("", !0),
326
- l.mode === r(P).TABLE ? (o(), c(r(Pe), J({
289
+ _: 1
290
+ }),
291
+ S("span", We, D(a.breadcrumb.text), 1)
292
+ ])) : y("", !0),
293
+ a.searchFields?.length ? (r(), v("div", {
327
294
  key: 1,
328
- ref_key: "tableRef",
329
- ref: T,
330
- data: $.value,
331
- columns: K.value,
332
- "tree-props": l.treeProps,
333
- "show-overflow-tooltip": !0
334
- }, { ...l.tableProps, loading: j.value }, ke(l.tableEvents), {
335
- class: "flex-1 admin-dashboard-table",
336
- border: "",
337
- onSelectionChange: ge
338
- }), Q({
339
- default: u(() => [
340
- l.showSelection ? (o(), c(r(U), {
341
- key: 0,
342
- type: "selection",
343
- width: "55",
344
- fixed: "left"
345
- })) : v("", !0),
346
- l.hasExpand ? (o(), c(r(U), {
347
- key: 1,
348
- width: "1",
349
- type: "expand",
350
- fixed: "left"
351
- }, {
352
- default: u((t) => [
353
- x(e.$slots, "expand", {
354
- row: t.row
355
- }, void 0, !0)
295
+ class: Q({
296
+ "search-section pd-b-12 mg-b-12": !a.isSeparate,
297
+ "bg-fff radius-4 pd-l-16 pd-r-16 pd-t-16 pd-b-16": a.isSeparate
298
+ })
299
+ }, [
300
+ h(te, { title: "查询" }),
301
+ h(i(Pe), {
302
+ ref_key: "searchFormRef",
303
+ ref: ie,
304
+ items: a.searchFields,
305
+ "filter-mode": !1,
306
+ minWidth: a.minWidth,
307
+ hideExpandButton: !1,
308
+ fixedWidth: !0,
309
+ maxHeight: 32,
310
+ modelValue: w.value,
311
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => w.value = o),
312
+ onOperation: ye
313
+ }, null, 8, ["items", "minWidth", "modelValue"])
314
+ ], 2)) : y("", !0),
315
+ S("div", {
316
+ class: Q(["data-section flex-1 overflow-hidden flex flex-col", {
317
+ "bg-fff radius-4 pd-l-16 pd-r-16 pd-t-16 pd-b-16 mg-t-16": a.isSeparate
318
+ }])
319
+ }, [
320
+ a.title ? E(e.$slots, "title", { key: 0 }, () => [
321
+ h(te, { title: a.title }, {
322
+ default: u(() => [
323
+ E(e.$slots, "title-actions", {}, void 0, !0)
356
324
  ]),
357
325
  _: 3
358
- })) : v("", !0),
359
- (o(!0), m(R, null, N(K.value, (t, d) => (o(), c(r(U), J({
360
- key: t.prop
361
- }, { ref_for: !0 }, t), Q({ _: 2 }, [
362
- t.type === r(te).ACTION ? {
363
- name: "default",
364
- fn: u((i) => [
365
- C("div", Fe, [
366
- (o(!0), m(R, null, N(pe(
367
- M(t, i.row)
368
- ), (s) => (o(), c(r(Ae), {
369
- key: s.key || s.label,
370
- type: s.type || "primary",
371
- size: s.size || "small",
372
- disabled: s.disabled,
373
- loading: s.loading,
374
- text: s.text,
375
- link: s.link,
376
- icon: s.icon,
377
- onClick: (Ye) => q(s, i.row, i.$index)
378
- }, {
379
- default: u(() => [
380
- X(D(s.label), 1)
326
+ }, 8, ["title"])
327
+ ], !0) : y("", !0),
328
+ a.mode === i(I).TABLE ? (r(), p(c, {
329
+ key: 1,
330
+ class: "flex-1 overflow-hidden"
331
+ }, {
332
+ default: u(({ width: o }) => [
333
+ h(i(De), X({
334
+ ref_key: "tableRef",
335
+ ref: B,
336
+ data: j.value,
337
+ columns: Y.value,
338
+ "tree-props": a.treeProps,
339
+ "show-overflow-tooltip": !0,
340
+ "row-key": a.treeProps.value || a.tableProps.rowKey
341
+ }, { ...a.tableProps, loading: F.value }, Ce(a.tableEvents), {
342
+ class: "w-full h-full admin-dashboard-table",
343
+ border: "",
344
+ onSelectionChange: ve
345
+ }), _({
346
+ default: u(() => [
347
+ a.showSelection ? (r(), p(i(H), {
348
+ key: 0,
349
+ type: "selection",
350
+ width: "55",
351
+ fixed: "left"
352
+ })) : y("", !0),
353
+ a.hasExpand ? (r(), p(i(H), {
354
+ key: 1,
355
+ width: "1",
356
+ type: "expand",
357
+ fixed: "left"
358
+ }, {
359
+ default: u((l) => [
360
+ S("div", {
361
+ class: "sticky-left",
362
+ style: xe({ width: o + "px" })
363
+ }, [
364
+ E(e.$slots, "expand", {
365
+ row: l.row
366
+ }, void 0, !0)
367
+ ], 4)
368
+ ]),
369
+ _: 2
370
+ }, 1024)) : y("", !0),
371
+ (r(!0), v(O, null, R(Y.value, (l, W) => (r(), p(i(H), X({
372
+ key: l.prop
373
+ }, { ref_for: !0 }, l), _({ _: 2 }, [
374
+ l.type === i(le).ACTION ? {
375
+ name: "default",
376
+ fn: u((f) => [
377
+ S("div", Ke, [
378
+ (r(!0), v(O, null, R(ge(
379
+ L(l, f.row)
380
+ ), (s) => (r(), p(i(Oe), {
381
+ key: s.key || s.label,
382
+ type: s.type || "primary",
383
+ size: s.size || "small",
384
+ disabled: s.disabled,
385
+ loading: s.loading,
386
+ text: s.text,
387
+ link: s.link,
388
+ icon: s.icon,
389
+ onClick: (Je) => J(s, f.row, f.$index)
390
+ }, {
391
+ default: u(() => [
392
+ ee(D(s.label), 1)
393
+ ]),
394
+ _: 2
395
+ }, 1032, ["type", "size", "disabled", "loading", "text", "link", "icon", "onClick"]))), 128)),
396
+ Z(L(l, f.row)).length > 0 ? (r(), p(i(Te), {
397
+ key: 0,
398
+ onCommand: (s) => J(s, f.row, f.$index),
399
+ trigger: "click"
400
+ }, {
401
+ dropdown: u(() => [
402
+ h(i(Be), null, {
403
+ default: u(() => [
404
+ (r(!0), v(O, null, R(Z(
405
+ L(l, f.row)
406
+ ), (s) => (r(), p(i(Ve), {
407
+ key: s.key || s.label,
408
+ command: s,
409
+ disabled: s.disabled
410
+ }, {
411
+ default: u(() => [
412
+ ee(D(s.label), 1)
413
+ ]),
414
+ _: 2
415
+ }, 1032, ["command", "disabled"]))), 128))
416
+ ]),
417
+ _: 2
418
+ }, 1024)
419
+ ]),
420
+ default: u(() => [
421
+ h(i(U), null, {
422
+ default: u(() => [
423
+ h(i(Ie))
424
+ ]),
425
+ _: 1
426
+ })
427
+ ]),
428
+ _: 2
429
+ }, 1032, ["onCommand"])) : y("", !0)
430
+ ])
381
431
  ]),
382
- _: 2
383
- }, 1032, ["type", "size", "disabled", "loading", "text", "link", "icon", "onClick"]))), 128)),
384
- H(M(t, i.row)).length > 0 ? (o(), c(r(Ne), {
385
- key: 0,
386
- onCommand: (s) => q(s, i.row, i.$index),
387
- trigger: "click"
388
- }, {
389
- dropdown: u(() => [
390
- k(r(De), null, {
391
- default: u(() => [
392
- (o(!0), m(R, null, N(H(
393
- M(t, i.row)
394
- ), (s) => (o(), c(r(Re), {
395
- key: s.key || s.label,
396
- command: s,
397
- disabled: s.disabled
398
- }, {
399
- default: u(() => [
400
- X(D(s.label), 1)
401
- ]),
402
- _: 2
403
- }, 1032, ["command", "disabled"]))), 128))
404
- ]),
405
- _: 2
406
- }, 1024)
432
+ key: "0"
433
+ } : me(l.prop) ? {
434
+ name: "default",
435
+ fn: u((f) => [
436
+ S("div", Ue, [
437
+ W === 0 && a.hasExpand ? (r(), p(i(U), {
438
+ key: 0,
439
+ class: "mg-r-10"
440
+ }, {
441
+ default: u(() => [
442
+ a.tableProps?.expandRowKeys?.includes(
443
+ f.row[a.tableProps.rowKey]
444
+ ) ? (r(), p(i(Ne), { key: 0 })) : (r(), p(i(Re), { key: 1 }))
445
+ ]),
446
+ _: 2
447
+ }, 1024)) : y("", !0),
448
+ S("div", He, [
449
+ E(e.$slots, l.prop, {
450
+ row: f.row,
451
+ index: f.$index,
452
+ column: l
453
+ }, void 0, !0)
454
+ ])
455
+ ])
407
456
  ]),
408
- default: u(() => [
409
- k(r(W), null, {
410
- default: u(() => [
411
- k(r(Ee))
412
- ]),
413
- _: 1
414
- })
457
+ key: "1"
458
+ } : {
459
+ name: "default",
460
+ fn: u((f) => [
461
+ S("span", null, D(pe(f.row, l)), 1)
415
462
  ]),
416
- _: 2
417
- }, 1032, ["onCommand"])) : v("", !0)
418
- ])
419
- ]),
420
- key: "0"
421
- } : ce(t.prop) ? {
422
- name: "default",
423
- fn: u((i) => [
424
- C("div", Me, [
425
- d === 0 && l.hasExpand ? (o(), c(r(W), {
426
- key: 0,
427
- class: "mg-r-10"
428
- }, {
429
- default: u(() => [
430
- l.tableProps?.expandRowKeys?.includes(
431
- i.row[l.tableProps.rowKey]
432
- ) ? (o(), c(r(ze), { key: 0 })) : (o(), c(r(Ie), { key: 1 }))
433
- ]),
434
- _: 2
435
- }, 1024)) : v("", !0),
436
- C("div", Le, [
437
- x(e.$slots, t.prop, {
438
- row: i.row,
439
- index: i.$index,
440
- column: t
441
- }, void 0, !0)
442
- ])
443
- ])
444
- ]),
445
- key: "1"
446
- } : {
447
- name: "default",
448
- fn: u((i) => [
449
- C("span", null, D(fe(i.row, t)), 1)
463
+ key: "2"
464
+ }
465
+ ]), 1040))), 128))
450
466
  ]),
451
- key: "2"
452
- }
453
- ]), 1040))), 128))
454
- ]),
455
- _: 2
456
- }, [
457
- N(l.customSlots, (t) => ({
458
- name: t,
459
- fn: u((d) => [
460
- x(e.$slots, t, Se(we(d)), void 0, !0)
461
- ])
462
- }))
463
- ]), 1040, ["data", "columns", "tree-props"])) : l.mode === r(P).CARD_INFINITE ? (o(), c(r(Oe), {
464
- key: 2,
465
- ref_key: "scrollbarRef",
466
- ref: re,
467
- class: "card-container flex-1",
468
- onEndReached: se
469
- }, {
470
- default: u(() => [
471
- C("div", We, [
472
- (o(!0), m(R, null, N($.value, (t, d) => (o(), m("div", {
473
- key: de(t, d),
474
- class: "card-item"
467
+ _: 2
475
468
  }, [
476
- x(e.$slots, "card", {
477
- item: t,
478
- index: d,
479
- data: $.value,
480
- loading: j.value
481
- }, void 0, !0)
482
- ]))), 128))
483
- ])
484
- ]),
485
- _: 3
486
- }, 512)) : v("", !0),
487
- l.showPagination && !F.value ? (o(), m("div", Ue, [
488
- k(r(Te), {
489
- "current-page": p.value.page,
490
- "onUpdate:currentPage": a[1] || (a[1] = (t) => p.value.page = t),
491
- "page-size": p.value.size,
492
- "onUpdate:pageSize": a[2] || (a[2] = (t) => p.value.size = t),
493
- "page-sizes": p.value.pageSizes,
494
- total: p.value.total,
495
- layout: p.value.layout,
496
- onSizeChange: w,
497
- onCurrentChange: w
498
- }, null, 8, ["current-page", "page-size", "page-sizes", "total", "layout"])
499
- ])) : v("", !0)
500
- ], 2),
501
- x(e.$slots, "default", {}, void 0, !0)
502
- ]));
469
+ R(a.customSlots, (l) => ({
470
+ name: l,
471
+ fn: u((W) => [
472
+ E(e.$slots, l, Ee(ze(W)), void 0, !0)
473
+ ])
474
+ }))
475
+ ]), 1040, ["data", "columns", "tree-props", "row-key"])
476
+ ]),
477
+ _: 3
478
+ })) : a.mode === i(I).CARD_INFINITE ? (r(), p(i($e), {
479
+ key: 2,
480
+ ref_key: "scrollbarRef",
481
+ ref: se,
482
+ class: "card-container flex-1",
483
+ onEndReached: de
484
+ }, {
485
+ default: u(() => [
486
+ S("div", Ye, [
487
+ (r(!0), v(O, null, R(j.value, (o, l) => (r(), v("div", {
488
+ key: fe(o, l),
489
+ class: "card-item"
490
+ }, [
491
+ E(e.$slots, "card", {
492
+ item: o,
493
+ index: l,
494
+ data: j.value,
495
+ loading: F.value
496
+ }, void 0, !0)
497
+ ]))), 128))
498
+ ])
499
+ ]),
500
+ _: 3
501
+ }, 512)) : y("", !0),
502
+ a.showPagination && !M.value ? (r(), v("div", Ze, [
503
+ h(i(je), {
504
+ "current-page": m.value.page,
505
+ "onUpdate:currentPage": t[1] || (t[1] = (o) => m.value.page = o),
506
+ "page-size": m.value.size,
507
+ "onUpdate:pageSize": t[2] || (t[2] = (o) => m.value.size = o),
508
+ "page-sizes": m.value.pageSizes,
509
+ total: m.value.total,
510
+ layout: m.value.layout,
511
+ onSizeChange: x,
512
+ onCurrentChange: x
513
+ }, null, 8, ["current-page", "page-size", "page-sizes", "total", "layout"])
514
+ ])) : y("", !0)
515
+ ], 2),
516
+ E(e.$slots, "default", {}, void 0, !0)
517
+ ]);
518
+ };
503
519
  }
504
- }), He = /* @__PURE__ */ Ve(Ke, [["__scopeId", "data-v-2ed02877"]]), at = ve(He);
520
+ }), Ge = /* @__PURE__ */ Me(qe, [["__scopeId", "data-v-5b5cf5e5"]]), rt = he(Ge);
505
521
  export {
506
- te as COLUMN_TYPES,
507
- P as MODES,
508
- at as PageContainer,
509
- at as default
522
+ le as COLUMN_TYPES,
523
+ I as MODES,
524
+ rt as PageContainer,
525
+ rt as default
510
526
  };