@ys-knife-crud/element-plus 0.0.1 → 0.0.2

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.
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import { defineComponent as ee, toRef as ve, computed as Q, resolveComponent as w, openBlock as n, createElementBlock as v, Fragment as N, createVNode as c, isRef as Ce, unref as i, withCtx as o, createElementVNode as p, renderList as Z, createBlock as h, createTextVNode as C, toDisplayString as P, createCommentVNode as M, resolveDynamicComponent as Te, normalizeClass as Se, renderSlot as le, Teleport as $t, withModifiers as rt, normalizeStyle as it, ref as I, onMounted as Fe, watch as me, useSlots as Vt, onBeforeUnmount as je, createSlots as Be, Transition as Ft, resolveDirective as ut, withDirectives as Je, mergeProps as Xe, inject as dt, provide as ct, withKeys as Ke, nextTick as He, shallowRef as Rt, normalizeProps as Qe, guardReactiveProps as Ee, createStaticVNode as lt } from "vue";
2
- import { useExportExcel as At, useCustomConfig as Mt, visibleActions as Ze, isEnabled as pt, useDefault as Pt, useSelection as Bt, useRowActions as Dt, filterNodesByKeyword as zt, collectGroupKeys as Qt, useMainPanelNodes as Et, useMainPanelTabs as Tt, findNode as nt, isGroupNode as ot, useAdvancedFilter as mt, useFilterPanel as It, FilterPanelKey as ft, useTextFilterItem as Yt, useDateFilterItem as Nt, useDateRangeFilterItem as qt, useEnumFilterItem as Ot, useImportExcel as Ut } from "@ys-knife-crud/vue";
3
- import { ElMessage as fe, ElMessageBox as vt } from "element-plus";
4
- import { isConditionGroup as et, OPERATOR_LABELS as Lt, isNullOperator as Ht, emptyFilter as tt } from "@ys-knife-crud/core";
5
- import { fromArray as lo, fromBool as no, fromObjectItems as oo, fromOptions as ao } from "@ys-knife-crud/core";
6
- import at from "dayjs";
7
- import './index.css';const Kt = { class: "export-options" }, jt = { class: "export-progress-text" }, Gt = { class: "export-cancelled-text" }, Wt = /* @__PURE__ */ ee({
1
+ import { defineComponent as Z, toRef as ve, computed as Q, resolveComponent as C, openBlock as n, createElementBlock as g, Fragment as L, createVNode as p, isRef as Se, unref as u, withCtx as o, createElementVNode as y, renderList as te, createBlock as h, createTextVNode as V, toDisplayString as z, createCommentVNode as R, resolveDynamicComponent as Qe, normalizeClass as $e, renderSlot as ne, Teleport as Mt, withModifiers as dt, normalizeStyle as ct, ref as Y, onMounted as Me, watch as me, useSlots as At, onBeforeUnmount as Ge, createSlots as Be, Transition as Rt, resolveDirective as pt, withDirectives as Xe, mergeProps as Ze, inject as mt, provide as ft, withKeys as je, nextTick as Ke, shallowRef as Pt, normalizeProps as Ie, guardReactiveProps as Te, createStaticVNode as nt, h as ye, isVNode as zt, render as ot } from "vue";
2
+ import { useExportExcel as Bt, useCustomConfig as Dt, visibleActions as et, isEnabled as vt, useDefault as Et, useSelection as It, useRowActions as Tt, filterNodesByKeyword as Qt, collectGroupKeys as Yt, useMainPanelNodes as Nt, useMainPanelTabs as qt, findNode as at, isGroupNode as st, useAdvancedFilter as yt, useFilterPanel as Ot, FilterPanelKey as gt, useTextFilterItem as Ut, useDateFilterItem as Lt, useDateRangeFilterItem as Ht, useEnumFilterItem as Kt, useImportExcel as jt, getDefaultModalAppContext as Gt, setDefaultModalAppContext as Wt } from "@ys-knife-crud/vue";
3
+ import { ElMessage as fe, ElMessageBox as kt, ElDialog as Jt, ElButton as Xt } from "element-plus";
4
+ import { isConditionGroup as tt, OPERATOR_LABELS as Zt, isNullOperator as el, emptyFilter as lt } from "@ys-knife-crud/core";
5
+ import { fromArray as yo, fromBool as go, fromObjectItems as ko, fromOptions as _o } from "@ys-knife-crud/core";
6
+ import it from "dayjs";
7
+ import './index.css';const tl = { class: "export-options" }, ll = { class: "export-progress-text" }, nl = { class: "export-cancelled-text" }, ol = /* @__PURE__ */ Z({
8
8
  __name: "exportExcelDialog",
9
9
  props: {
10
10
  dataFun: { type: Function },
@@ -18,24 +18,24 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
18
18
  exportPageSize: {},
19
19
  hasMorePage: { type: Boolean }
20
20
  },
21
- setup(e, { expose: f }) {
21
+ setup(e, { expose: m }) {
22
22
  const t = e, {
23
23
  exportOptions: l,
24
24
  exportDialogVisible: a,
25
25
  exporting: k,
26
- exportFetched: u,
27
- exportTotal: A,
28
- exportTotalKnown: y,
26
+ exportFetched: r,
27
+ exportTotal: $,
28
+ exportTotalKnown: f,
29
29
  exportEtaSeconds: x,
30
30
  exportPercent: S,
31
- exportCancelledVisible: B,
32
- exportCancelledRows: U,
33
- onExportClick: R,
31
+ exportCancelledVisible: P,
32
+ exportCancelledRows: H,
33
+ onExportClick: A,
34
34
  doExport: b,
35
35
  cancelExport: _,
36
- keepPartialExport: q,
36
+ keepPartialExport: N,
37
37
  discardPartialExport: T
38
- } = At({
38
+ } = Bt({
39
39
  props: t,
40
40
  // reactive — dataFun/exportSelected/exportorFunc 自动追踪
41
41
  tableName: ve(t, "tableName"),
@@ -45,33 +45,33 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
45
45
  total: ve(t, "total"),
46
46
  exportPageSize: ve(t, "exportPageSize"),
47
47
  hasMorePage: ve(t, "hasMorePage")
48
- }), X = Q(() => {
49
- const j = x.value;
50
- if (j == null) return null;
51
- if (j < 60) return `${j} 秒`;
52
- const r = Math.floor(j / 60), m = j % 60;
53
- return m > 0 ? `${r} 分 ${m} 秒` : `${r} 分`;
48
+ }), U = Q(() => {
49
+ const G = x.value;
50
+ if (G == null) return null;
51
+ if (G < 60) return `${G} 秒`;
52
+ const s = Math.floor(G / 60), v = G % 60;
53
+ return v > 0 ? `${s} 分 ${v} 秒` : `${s} 分`;
54
54
  });
55
- return f({ openExportDialog: R }), (j, r) => {
56
- const m = w("el-button"), F = w("el-dialog"), Y = w("el-progress");
57
- return n(), v(N, null, [
58
- c(F, {
59
- modelValue: i(a),
60
- "onUpdate:modelValue": r[0] || (r[0] = (E) => Ce(a) ? a.value = E : null),
55
+ return m({ openExportDialog: A }), (G, s) => {
56
+ const v = C("el-button"), F = C("el-dialog"), q = C("el-progress");
57
+ return n(), g(L, null, [
58
+ p(F, {
59
+ modelValue: u(a),
60
+ "onUpdate:modelValue": s[0] || (s[0] = (E) => Se(a) ? a.value = E : null),
61
61
  title: "导出 Excel",
62
62
  width: "420px"
63
63
  }, {
64
64
  default: o(() => [
65
- p("div", Kt, [
66
- (n(!0), v(N, null, Z(i(l), (E) => (n(), h(m, {
65
+ y("div", tl, [
66
+ (n(!0), g(L, null, te(u(l), (E) => (n(), h(v, {
67
67
  key: E.value,
68
68
  class: "export-option",
69
69
  "data-scope": E.value,
70
70
  disabled: E.disabled,
71
- onClick: (ue) => i(b)(E.value)
71
+ onClick: (ue) => u(b)(E.value)
72
72
  }, {
73
73
  default: o(() => [
74
- C(P(E.label), 1)
74
+ V(z(E.label), 1)
75
75
  ]),
76
76
  _: 2
77
77
  }, 1032, ["data-scope", "disabled", "onClick"]))), 128))
@@ -79,81 +79,81 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
79
79
  ]),
80
80
  _: 1
81
81
  }, 8, ["modelValue"]),
82
- c(F, {
83
- modelValue: i(k),
84
- "onUpdate:modelValue": r[1] || (r[1] = (E) => Ce(k) ? k.value = E : null),
82
+ p(F, {
83
+ modelValue: u(k),
84
+ "onUpdate:modelValue": s[1] || (s[1] = (E) => Se(k) ? k.value = E : null),
85
85
  title: "正在导出",
86
86
  width: "420px",
87
87
  "close-on-click-modal": !1,
88
88
  "show-close": !1
89
89
  }, {
90
90
  footer: o(() => [
91
- c(m, {
91
+ p(v, {
92
92
  class: "export-cancel",
93
- onClick: i(_)
93
+ onClick: u(_)
94
94
  }, {
95
- default: o(() => [...r[4] || (r[4] = [
96
- C("取消", -1)
95
+ default: o(() => [...s[4] || (s[4] = [
96
+ V("取消", -1)
97
97
  ])]),
98
98
  _: 1
99
99
  }, 8, ["onClick"])
100
100
  ]),
101
101
  default: o(() => [
102
- c(Y, { percentage: i(S) }, null, 8, ["percentage"]),
103
- p("p", jt, [
104
- C(" 已加载 " + P(i(u)), 1),
105
- i(y) ? (n(), v(N, { key: 0 }, [
106
- C(" / " + P(i(A)), 1)
107
- ], 64)) : M("", !0),
108
- r[3] || (r[3] = C(" 条", -1)),
109
- X.value ? (n(), v(N, { key: 1 }, [
110
- C(",预计剩余约 " + P(X.value), 1)
111
- ], 64)) : M("", !0)
102
+ p(q, { percentage: u(S) }, null, 8, ["percentage"]),
103
+ y("p", ll, [
104
+ V(" 已加载 " + z(u(r)), 1),
105
+ u(f) ? (n(), g(L, { key: 0 }, [
106
+ V(" / " + z(u($)), 1)
107
+ ], 64)) : R("", !0),
108
+ s[3] || (s[3] = V(" 条", -1)),
109
+ U.value ? (n(), g(L, { key: 1 }, [
110
+ V(",预计剩余约 " + z(U.value), 1)
111
+ ], 64)) : R("", !0)
112
112
  ])
113
113
  ]),
114
114
  _: 1
115
115
  }, 8, ["modelValue"]),
116
- c(F, {
117
- modelValue: i(B),
118
- "onUpdate:modelValue": r[2] || (r[2] = (E) => Ce(B) ? B.value = E : null),
116
+ p(F, {
117
+ modelValue: u(P),
118
+ "onUpdate:modelValue": s[2] || (s[2] = (E) => Se(P) ? P.value = E : null),
119
119
  title: "导出已取消",
120
120
  width: "420px"
121
121
  }, {
122
122
  footer: o(() => [
123
- c(m, {
123
+ p(v, {
124
124
  class: "export-discard",
125
- onClick: i(T)
125
+ onClick: u(T)
126
126
  }, {
127
- default: o(() => [...r[5] || (r[5] = [
128
- C("丢弃", -1)
127
+ default: o(() => [...s[5] || (s[5] = [
128
+ V("丢弃", -1)
129
129
  ])]),
130
130
  _: 1
131
131
  }, 8, ["onClick"]),
132
- c(m, {
132
+ p(v, {
133
133
  class: "export-keep",
134
134
  type: "primary",
135
- onClick: i(q)
135
+ onClick: u(N)
136
136
  }, {
137
- default: o(() => [...r[6] || (r[6] = [
138
- C("保留部分文件", -1)
137
+ default: o(() => [...s[6] || (s[6] = [
138
+ V("保留部分文件", -1)
139
139
  ])]),
140
140
  _: 1
141
141
  }, 8, ["onClick"])
142
142
  ]),
143
143
  default: o(() => [
144
- p("p", Gt, " 已写入 " + P(i(U)) + " 条数据,是否保留已导出的部分文件? ", 1)
144
+ y("p", nl, " 已写入 " + z(u(H)) + " 条数据,是否保留已导出的部分文件? ", 1)
145
145
  ]),
146
146
  _: 1
147
147
  }, 8, ["modelValue"])
148
148
  ], 64);
149
149
  };
150
150
  }
151
- }), ae = (e, f) => {
151
+ }), ae = (e, m) => {
152
152
  const t = e.__vccOpts || e;
153
- for (const [l, a] of f)
153
+ for (const [l, a] of m)
154
154
  t[l] = a;
155
155
  return t;
156
- }, Jt = /* @__PURE__ */ ae(Wt, [["__scopeId", "data-v-06458805"]]), Xt = /* @__PURE__ */ ee({
156
+ }, al = /* @__PURE__ */ ae(ol, [["__scopeId", "data-v-83eeda9c"]]), sl = /* @__PURE__ */ Z({
157
157
  __name: "columnConfigDialog",
158
158
  props: {
159
159
  /** 加载自定义配置(含列设置与用户默认分页大小;返回 null 按空配置处理) */
@@ -163,7 +163,7 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
163
163
  /** 列元数据(候选列取 meta 中 showForDisplay=true 的列) */
164
164
  meta: { type: Object, default: null }
165
165
  },
166
- setup(e, { expose: f }) {
166
+ setup(e, { expose: m }) {
167
167
  const t = e, l = {
168
168
  get loadCustomConfigFun() {
169
169
  return t.loadCustomConfigFun;
@@ -175,103 +175,103 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
175
175
  // 字段(状态 + 派生)
176
176
  columns: a,
177
177
  customConfigLoading: k,
178
- defaultPageSize: u,
179
- configDialogVisible: A,
180
- draftColumns: y,
178
+ defaultPageSize: r,
179
+ configDialogVisible: $,
180
+ draftColumns: f,
181
181
  // 函数
182
182
  loadCustomConfigs: x,
183
183
  updateDefaultPageSize: S,
184
- updateColumnWidth: B,
185
- openConfigDialog: U,
186
- moveDraft: R,
184
+ updateColumnWidth: P,
185
+ openConfigDialog: H,
186
+ moveDraft: A,
187
187
  resetDraft: b,
188
188
  saveConfigDialog: _
189
- } = Mt(l, ve(t, "meta"));
190
- return f({
189
+ } = Dt(l, ve(t, "meta"));
190
+ return m({
191
191
  // 字段
192
192
  columns: a,
193
- defaultPageSize: u,
193
+ defaultPageSize: r,
194
194
  customConfigLoading: k,
195
195
  // 函数
196
196
  updateDefaultPageSize: S,
197
- updateColumnWidth: B,
197
+ updateColumnWidth: P,
198
198
  loadCustomConfigs: x,
199
- openDialog: U
200
- }), (q, T) => {
201
- const X = w("el-checkbox"), j = w("el-input"), r = w("el-button"), m = w("el-dialog");
202
- return n(), h(m, {
203
- modelValue: i(A),
204
- "onUpdate:modelValue": T[1] || (T[1] = (F) => Ce(A) ? A.value = F : null),
199
+ openDialog: H
200
+ }), (N, T) => {
201
+ const U = C("el-checkbox"), G = C("el-input"), s = C("el-button"), v = C("el-dialog");
202
+ return n(), h(v, {
203
+ modelValue: u($),
204
+ "onUpdate:modelValue": T[1] || (T[1] = (F) => Se($) ? $.value = F : null),
205
205
  title: "列设置",
206
206
  width: "480px"
207
207
  }, {
208
208
  footer: o(() => [
209
- c(r, { onClick: i(b) }, {
209
+ p(s, { onClick: u(b) }, {
210
210
  default: o(() => [...T[4] || (T[4] = [
211
- C("重置", -1)
211
+ V("重置", -1)
212
212
  ])]),
213
213
  _: 1
214
214
  }, 8, ["onClick"]),
215
- c(r, {
216
- onClick: T[0] || (T[0] = (F) => A.value = !1)
215
+ p(s, {
216
+ onClick: T[0] || (T[0] = (F) => $.value = !1)
217
217
  }, {
218
218
  default: o(() => [...T[5] || (T[5] = [
219
- C("取消", -1)
219
+ V("取消", -1)
220
220
  ])]),
221
221
  _: 1
222
222
  }),
223
- c(r, {
223
+ p(s, {
224
224
  type: "primary",
225
225
  class: "col-config-save",
226
- onClick: i(_)
226
+ onClick: u(_)
227
227
  }, {
228
228
  default: o(() => [...T[6] || (T[6] = [
229
- C("保存", -1)
229
+ V("保存", -1)
230
230
  ])]),
231
231
  _: 1
232
232
  }, 8, ["onClick"])
233
233
  ]),
234
234
  default: o(() => [
235
- (n(!0), v(N, null, Z(i(y), (F, Y) => (n(), v("div", {
235
+ (n(!0), g(L, null, te(u(f), (F, q) => (n(), g("div", {
236
236
  key: F.propertyPath,
237
237
  class: "col-config-row"
238
238
  }, [
239
- c(X, {
239
+ p(U, {
240
240
  modelValue: F.visible,
241
241
  "onUpdate:modelValue": (E) => F.visible = E,
242
242
  class: "col-config-name"
243
243
  }, {
244
244
  default: o(() => [
245
- C(P(F.displayName), 1)
245
+ V(z(F.displayName), 1)
246
246
  ]),
247
247
  _: 2
248
248
  }, 1032, ["modelValue", "onUpdate:modelValue"]),
249
- c(j, {
249
+ p(G, {
250
250
  modelValue: F.width,
251
251
  "onUpdate:modelValue": (E) => F.width = E,
252
252
  class: "col-config-width",
253
253
  placeholder: "宽度(如 120)",
254
254
  size: "small"
255
255
  }, null, 8, ["modelValue", "onUpdate:modelValue"]),
256
- c(r, {
256
+ p(s, {
257
257
  link: "",
258
258
  type: "primary",
259
- disabled: Y === 0,
260
- onClick: (E) => i(R)(Y, -1)
259
+ disabled: q === 0,
260
+ onClick: (E) => u(A)(q, -1)
261
261
  }, {
262
262
  default: o(() => [...T[2] || (T[2] = [
263
- C("上移", -1)
263
+ V("上移", -1)
264
264
  ])]),
265
265
  _: 1
266
266
  }, 8, ["disabled", "onClick"]),
267
- c(r, {
267
+ p(s, {
268
268
  link: "",
269
269
  type: "primary",
270
- disabled: Y === i(y).length - 1,
271
- onClick: (E) => i(R)(Y, 1)
270
+ disabled: q === u(f).length - 1,
271
+ onClick: (E) => u(A)(q, 1)
272
272
  }, {
273
273
  default: o(() => [...T[3] || (T[3] = [
274
- C(" 下移 ", -1)
274
+ V(" 下移 ", -1)
275
275
  ])]),
276
276
  _: 1
277
277
  }, 8, ["disabled", "onClick"])
@@ -281,7 +281,7 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
281
281
  }, 8, ["modelValue"]);
282
282
  };
283
283
  }
284
- }), Zt = /* @__PURE__ */ ae(Xt, [["__scopeId", "data-v-a6f853c4"]]), el = /* @__PURE__ */ ee({
284
+ }), il = /* @__PURE__ */ ae(sl, [["__scopeId", "data-v-a6f853c4"]]), rl = /* @__PURE__ */ Z({
285
285
  __name: "rowActionsColumn",
286
286
  props: {
287
287
  /** 行操作列表(由 Table 的 useRowActions 加载);为空时不渲染操作列 */
@@ -292,41 +292,41 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
292
292
  resizable: { type: Boolean, default: !0 }
293
293
  },
294
294
  setup(e) {
295
- const f = e, t = Q(
296
- () => f.actions.length === 0 ? void 0 : f.actions.length * 34 + (f.actions.length - 1) * 12 + 30
295
+ const m = e, t = Q(
296
+ () => m.actions.length === 0 ? void 0 : m.actions.length * 34 + (m.actions.length - 1) * 12 + 30
297
297
  );
298
298
  return (l, a) => {
299
- const k = w("el-button"), u = w("el-table-column");
300
- return f.actions.length > 0 ? (n(), h(u, {
299
+ const k = C("el-button"), r = C("el-table-column");
300
+ return m.actions.length > 0 ? (n(), h(r, {
301
301
  key: 0,
302
302
  label: "操作",
303
303
  fixed: "right",
304
304
  "min-width": t.value,
305
- resizable: f.resizable
305
+ resizable: m.resizable
306
306
  }, {
307
- default: o(({ row: A }) => [
308
- (n(!0), v(N, null, Z(i(Ze)(f.actions, A), (y) => (n(), h(k, {
309
- key: y.name,
307
+ default: o(({ row: $ }) => [
308
+ (n(!0), g(L, null, te(u(et)(m.actions, $), (f) => (n(), h(k, {
309
+ key: f.name,
310
310
  link: "",
311
- type: y.type ?? "primary",
312
- disabled: !i(pt)(y, A),
313
- onClick: (x) => y.execute(A, f.table)
311
+ type: f.type ?? "primary",
312
+ disabled: !u(vt)(f, $),
313
+ onClick: (x) => f.execute($, m.table)
314
314
  }, {
315
315
  default: o(() => [
316
- y.icon ? (n(), h(Te(y.icon), {
316
+ f.icon ? (n(), h(Qe(f.icon), {
317
317
  key: 0,
318
318
  class: "yk-row-action__icon"
319
- })) : M("", !0),
320
- C(" " + P(y.desc), 1)
319
+ })) : R("", !0),
320
+ V(" " + z(f.desc), 1)
321
321
  ]),
322
322
  _: 2
323
323
  }, 1032, ["type", "disabled", "onClick"]))), 128))
324
324
  ]),
325
325
  _: 1
326
- }, 8, ["min-width", "resizable"])) : M("", !0);
326
+ }, 8, ["min-width", "resizable"])) : R("", !0);
327
327
  };
328
328
  }
329
- }), tl = /* @__PURE__ */ ae(el, [["__scopeId", "data-v-cc706c9e"]]), ll = { class: "yk-table__cards" }, nl = ["title", "onContextmenu"], ol = { class: "yk-table__card-json" }, al = /* @__PURE__ */ ee({
329
+ }), ul = /* @__PURE__ */ ae(rl, [["__scopeId", "data-v-34f3d742"]]), dl = { class: "yk-table__cards" }, cl = ["title", "onContextmenu"], pl = { class: "yk-table__card-json" }, ml = /* @__PURE__ */ Z({
330
330
  __name: "cardView",
331
331
  props: {
332
332
  rows: {},
@@ -337,43 +337,43 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
337
337
  isSelected: { type: Function }
338
338
  },
339
339
  emits: ["check", "contextmenu"],
340
- setup(e, { emit: f }) {
341
- const t = e, l = f;
340
+ setup(e, { emit: m }) {
341
+ const t = e, l = m;
342
342
  return (a, k) => {
343
- const u = w("el-checkbox"), A = w("el-empty");
344
- return n(), v("div", ll, [
345
- (n(!0), v(N, null, Z(t.rows, (y, x) => (n(), v("div", {
346
- key: String(y[t.rowKey]),
347
- class: Se(["yk-table__card", {
348
- "is-selected": t.showCheckbox && t.isSelected(y),
343
+ const r = C("el-checkbox"), $ = C("el-empty");
344
+ return n(), g("div", dl, [
345
+ (n(!0), g(L, null, te(t.rows, (f, x) => (n(), g("div", {
346
+ key: String(f[t.rowKey]),
347
+ class: $e(["yk-table__card", {
348
+ "is-selected": t.showCheckbox && t.isSelected(f),
349
349
  "has-actions": t.hasActions
350
350
  }]),
351
351
  title: t.hasActions ? "右键查看行操作" : void 0,
352
- onContextmenu: (S) => l("contextmenu", S, y)
352
+ onContextmenu: (S) => l("contextmenu", S, f)
353
353
  }, [
354
- t.showCheckbox ? (n(), h(u, {
354
+ t.showCheckbox ? (n(), h(r, {
355
355
  key: 0,
356
356
  class: "yk-table__card-checkbox",
357
- "model-value": t.isSelected(y),
358
- onChange: (S) => l("check", y, S)
359
- }, null, 8, ["model-value", "onChange"])) : M("", !0),
360
- le(a.$slots, "default", {
361
- row: y,
357
+ "model-value": t.isSelected(f),
358
+ onChange: (S) => l("check", f, S)
359
+ }, null, 8, ["model-value", "onChange"])) : R("", !0),
360
+ ne(a.$slots, "default", {
361
+ row: f,
362
362
  index: x
363
363
  }, () => [
364
- p("pre", ol, P(JSON.stringify(y, null, 2)), 1)
364
+ y("pre", pl, z(JSON.stringify(f, null, 2)), 1)
365
365
  ], !0)
366
- ], 42, nl))), 128)),
367
- !t.loading && t.rows.length === 0 ? (n(), v(N, { key: 0 }, [
368
- a.$slots.empty ? le(a.$slots, "empty", {}, void 0, !0, 0) : (n(), h(A, {
366
+ ], 42, cl))), 128)),
367
+ !t.loading && t.rows.length === 0 ? (n(), g(L, { key: 0 }, [
368
+ a.$slots.empty ? ne(a.$slots, "empty", {}, void 0, !0, 0) : (n(), h($, {
369
369
  key: 1,
370
370
  description: "暂无数据"
371
371
  }))
372
- ], 64)) : M("", !0)
372
+ ], 64)) : R("", !0)
373
373
  ]);
374
374
  };
375
375
  }
376
- }), sl = /* @__PURE__ */ ae(al, [["__scopeId", "data-v-88966e9a"]]), rl = { class: "yk-table__list" }, il = ["title", "onContextmenu"], ul = { class: "yk-table__list-item-body" }, dl = { class: "yk-table__list-item-json" }, cl = /* @__PURE__ */ ee({
376
+ }), fl = /* @__PURE__ */ ae(ml, [["__scopeId", "data-v-88966e9a"]]), vl = { class: "yk-table__list" }, yl = ["title", "onContextmenu"], gl = { class: "yk-table__list-item-body" }, kl = { class: "yk-table__list-item-json" }, _l = /* @__PURE__ */ Z({
377
377
  __name: "listView",
378
378
  props: {
379
379
  rows: {},
@@ -384,45 +384,45 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
384
384
  isSelected: { type: Function }
385
385
  },
386
386
  emits: ["check", "contextmenu"],
387
- setup(e, { emit: f }) {
388
- const t = e, l = f;
387
+ setup(e, { emit: m }) {
388
+ const t = e, l = m;
389
389
  return (a, k) => {
390
- const u = w("el-checkbox"), A = w("el-empty");
391
- return n(), v("div", rl, [
392
- (n(!0), v(N, null, Z(t.rows, (y, x) => (n(), v("div", {
393
- key: String(y[t.rowKey]),
394
- class: Se(["yk-table__list-item", {
395
- "is-selected": t.showCheckbox && t.isSelected(y),
390
+ const r = C("el-checkbox"), $ = C("el-empty");
391
+ return n(), g("div", vl, [
392
+ (n(!0), g(L, null, te(t.rows, (f, x) => (n(), g("div", {
393
+ key: String(f[t.rowKey]),
394
+ class: $e(["yk-table__list-item", {
395
+ "is-selected": t.showCheckbox && t.isSelected(f),
396
396
  "has-actions": t.hasActions
397
397
  }]),
398
398
  title: t.hasActions ? "右键查看行操作" : void 0,
399
- onContextmenu: (S) => l("contextmenu", S, y)
399
+ onContextmenu: (S) => l("contextmenu", S, f)
400
400
  }, [
401
- t.showCheckbox ? (n(), h(u, {
401
+ t.showCheckbox ? (n(), h(r, {
402
402
  key: 0,
403
403
  class: "yk-table__list-item-checkbox",
404
- "model-value": t.isSelected(y),
405
- onChange: (S) => l("check", y, S)
406
- }, null, 8, ["model-value", "onChange"])) : M("", !0),
407
- p("div", ul, [
408
- le(a.$slots, "default", {
409
- row: y,
404
+ "model-value": t.isSelected(f),
405
+ onChange: (S) => l("check", f, S)
406
+ }, null, 8, ["model-value", "onChange"])) : R("", !0),
407
+ y("div", gl, [
408
+ ne(a.$slots, "default", {
409
+ row: f,
410
410
  index: x
411
411
  }, () => [
412
- p("pre", dl, P(JSON.stringify(y, null, 2)), 1)
412
+ y("pre", kl, z(JSON.stringify(f, null, 2)), 1)
413
413
  ], !0)
414
414
  ])
415
- ], 42, il))), 128)),
416
- !t.loading && t.rows.length === 0 ? (n(), v(N, { key: 0 }, [
417
- a.$slots.empty ? le(a.$slots, "empty", {}, void 0, !0, 0) : (n(), h(A, {
415
+ ], 42, yl))), 128)),
416
+ !t.loading && t.rows.length === 0 ? (n(), g(L, { key: 0 }, [
417
+ a.$slots.empty ? ne(a.$slots, "empty", {}, void 0, !0, 0) : (n(), h($, {
418
418
  key: 1,
419
419
  description: "暂无数据"
420
420
  }))
421
- ], 64)) : M("", !0)
421
+ ], 64)) : R("", !0)
422
422
  ]);
423
423
  };
424
424
  }
425
- }), pl = /* @__PURE__ */ ae(cl, [["__scopeId", "data-v-0488eb89"]]), ml = ["onClick"], fl = /* @__PURE__ */ ee({
425
+ }), bl = /* @__PURE__ */ ae(_l, [["__scopeId", "data-v-0488eb89"]]), hl = ["onClick"], wl = /* @__PURE__ */ Z({
426
426
  __name: "contextMenu",
427
427
  props: {
428
428
  menu: {},
@@ -430,41 +430,41 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
430
430
  isEnabled: { type: Function }
431
431
  },
432
432
  emits: ["close", "select"],
433
- setup(e, { emit: f }) {
434
- const t = e, l = f;
435
- return (a, k) => (n(), h($t, { to: "body" }, [
436
- t.menu ? (n(), v(N, { key: 0 }, [
437
- p("div", {
433
+ setup(e, { emit: m }) {
434
+ const t = e, l = m;
435
+ return (a, k) => (n(), h(Mt, { to: "body" }, [
436
+ t.menu ? (n(), g(L, { key: 0 }, [
437
+ y("div", {
438
438
  class: "yk-table__menu-mask",
439
- onClick: k[0] || (k[0] = (u) => l("close")),
440
- onContextmenu: k[1] || (k[1] = rt((u) => l("close"), ["prevent"]))
439
+ onClick: k[0] || (k[0] = (r) => l("close")),
440
+ onContextmenu: k[1] || (k[1] = dt((r) => l("close"), ["prevent"]))
441
441
  }, null, 32),
442
- p("ul", {
442
+ y("ul", {
443
443
  class: "yk-table__context-menu",
444
- style: it({ left: `${t.menu.x}px`, top: `${t.menu.y}px` })
444
+ style: ct({ left: `${t.menu.x}px`, top: `${t.menu.y}px` })
445
445
  }, [
446
- (n(!0), v(N, null, Z(t.actions, (u) => (n(), v("li", {
447
- key: u.name,
448
- class: Se(["yk-table__context-menu-item", { "is-disabled": !t.isEnabled(u, t.menu.row) }]),
449
- onClick: (A) => t.isEnabled(u, t.menu.row) && l("select", u)
446
+ (n(!0), g(L, null, te(t.actions, (r) => (n(), g("li", {
447
+ key: r.name,
448
+ class: $e(["yk-table__context-menu-item", { "is-disabled": !t.isEnabled(r, t.menu.row) }]),
449
+ onClick: ($) => t.isEnabled(r, t.menu.row) && l("select", r)
450
450
  }, [
451
- u.icon ? (n(), h(Te(u.icon), {
451
+ r.icon ? (n(), h(Qe(r.icon), {
452
452
  key: 0,
453
453
  class: "yk-table__context-menu-icon"
454
- })) : M("", !0),
455
- C(" " + P(u.desc), 1)
456
- ], 10, ml))), 128))
454
+ })) : R("", !0),
455
+ V(" " + z(r.desc), 1)
456
+ ], 10, hl))), 128))
457
457
  ], 4)
458
- ], 64)) : M("", !0)
458
+ ], 64)) : R("", !0)
459
459
  ]));
460
460
  }
461
- }), vl = /* @__PURE__ */ ae(fl, [["__scopeId", "data-v-32592dd4"]]), yl = { class: "yk-table" }, gl = { class: "yk-table__view-area" }, kl = {
461
+ }), xl = /* @__PURE__ */ ae(wl, [["__scopeId", "data-v-32592dd4"]]), Cl = { class: "yk-table" }, Sl = { class: "yk-table__view-area" }, $l = {
462
462
  key: 0,
463
463
  class: "yk-table__loading-mask"
464
- }, _l = {
464
+ }, Vl = {
465
465
  key: 0,
466
466
  class: "yk-table__footer"
467
- }, bl = { class: "yk-table__footer-extra" }, hl = /* @__PURE__ */ ee({
467
+ }, Fl = { class: "yk-table__footer-extra" }, Ml = /* @__PURE__ */ Z({
468
468
  name: "YsTable",
469
469
  __name: "table",
470
470
  props: {
@@ -515,205 +515,205 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
515
515
  viewMode: { type: String, default: "table" }
516
516
  },
517
517
  emits: ["data-loaded", "update:viewMode", "update:showCheckbox", "update:columnResizable", "update:stickyHeader"],
518
- setup(e, { expose: f, emit: t }) {
518
+ setup(e, { expose: m, emit: t }) {
519
519
  const l = e, a = t, {
520
520
  meta: k,
521
- paged: u,
522
- rows: A,
523
- metaLoading: y,
521
+ paged: r,
522
+ rows: $,
523
+ metaLoading: f,
524
524
  dataLoading: x,
525
525
  currentPage: S,
526
- total: B,
527
- totalKnown: U,
528
- loadMeta: R
529
- } = Pt(l), b = I(null), {
526
+ total: P,
527
+ totalKnown: H,
528
+ loadMeta: A
529
+ } = Et(l), b = Y(null), {
530
530
  selectedRows: _,
531
- onSelectionChange: q,
531
+ onSelectionChange: N,
532
532
  isRowSelected: T,
533
- toggleRowSelection: X,
534
- restoreSelection: j,
535
- clearSelection: r,
536
- selectAllOnPage: m,
533
+ toggleRowSelection: U,
534
+ restoreSelection: G,
535
+ clearSelection: s,
536
+ selectAllOnPage: v,
537
537
  invertSelectionOnPage: F
538
- } = Bt({ tableEl: b, rows: A, rowKey: ve(l, "rowKey") }), Y = {
538
+ } = It({ tableEl: b, rows: $, rowKey: ve(l, "rowKey") }), q = {
539
539
  get rowActionsFunc() {
540
540
  return l.rowActionsFunc;
541
541
  }
542
- }, { actions: E, actionsLoading: ue, loadActions: ce } = Dt(Y), oe = I(null), $ = Q(() => {
543
- var s;
544
- return ((s = oe.value) == null ? void 0 : s.columns) ?? [];
545
- }), g = Q(() => {
546
- var s;
547
- return ((s = oe.value) == null ? void 0 : s.defaultPageSize) ?? l.pageSize;
548
- }), G = Q(() => {
549
- var s;
550
- return ((s = oe.value) == null ? void 0 : s.customConfigLoading) ?? !1;
551
- }), de = I(null);
552
- async function D(s) {
542
+ }, { actions: E, actionsLoading: ue, loadActions: de } = Tt(q), ee = Y(null), w = Q(() => {
543
+ var i;
544
+ return ((i = ee.value) == null ? void 0 : i.columns) ?? [];
545
+ }), d = Q(() => {
546
+ var i;
547
+ return ((i = ee.value) == null ? void 0 : i.defaultPageSize) ?? l.pageSize;
548
+ }), j = Q(() => {
549
+ var i;
550
+ return ((i = ee.value) == null ? void 0 : i.customConfigLoading) ?? !1;
551
+ }), se = Y(null);
552
+ async function D(i) {
553
553
  x.value = !0;
554
554
  try {
555
- const W = (S.value - 1) * g.value, re = await l.dataFun({ limit: g.value, offset: W }, s);
556
- u.value = re, a("data-loaded", re);
555
+ const J = (S.value - 1) * d.value, re = await l.dataFun({ limit: d.value, offset: J }, i);
556
+ r.value = re, a("data-loaded", re);
557
557
  } finally {
558
558
  x.value = !1;
559
559
  }
560
560
  }
561
- const z = Q(() => {
562
- var W;
563
- const s = Math.min(g.value, ...l.pageSizes);
564
- return B.value > s || (((W = u.value) == null ? void 0 : W.hasNext) ?? !1);
565
- }), H = Q(
566
- () => y.value || x.value || ue.value || G.value
561
+ const I = Q(() => {
562
+ var J;
563
+ const i = Math.min(d.value, ...l.pageSizes);
564
+ return P.value > i || (((J = r.value) == null ? void 0 : J.hasNext) ?? !1);
565
+ }), B = Q(
566
+ () => f.value || x.value || ue.value || j.value
567
567
  );
568
- function L(s) {
569
- S.value = s, D();
568
+ function O(i) {
569
+ S.value = i, D();
570
570
  }
571
- function se(s) {
572
- var W;
573
- (W = oe.value) == null || W.updateDefaultPageSize(s), S.value = 1, D();
571
+ function ie(i) {
572
+ var J;
573
+ (J = ee.value) == null || J.updateDefaultPageSize(i), S.value = 1, D();
574
574
  }
575
- function K(s, W, re) {
576
- var ke;
577
- re.property && ((ke = oe.value) == null || ke.updateColumnWidth(re.property, s));
575
+ function W(i, J, re) {
576
+ var _e;
577
+ re.property && ((_e = ee.value) == null || _e.updateColumnWidth(re.property, i));
578
578
  }
579
- async function ne() {
580
- var s;
579
+ async function oe() {
580
+ var i;
581
581
  await Promise.all([
582
- R(),
583
- ce(),
584
- (s = oe.value) == null ? void 0 : s.loadCustomConfigs()
582
+ A(),
583
+ de(),
584
+ (i = ee.value) == null ? void 0 : i.loadCustomConfigs()
585
585
  ]), S.value = 1, D();
586
586
  }
587
- function ge() {
587
+ function ke() {
588
588
  D();
589
589
  }
590
- Fe(ne), me(() => l.pageSize, (s) => {
591
- se(s);
590
+ Me(oe), me(() => l.pageSize, (i) => {
591
+ ie(i);
592
592
  }), me(() => l.dataFun, () => {
593
593
  S.value = 1, D();
594
594
  });
595
- const xe = I(l.viewMode);
596
- me(() => l.viewMode, (s) => {
597
- xe.value = s;
595
+ const Ce = Y(l.viewMode);
596
+ me(() => l.viewMode, (i) => {
597
+ Ce.value = i;
598
598
  });
599
599
  const pe = Q({
600
- get: () => xe.value,
601
- set: (s) => {
602
- xe.value = s, a("update:viewMode", s);
600
+ get: () => Ce.value,
601
+ set: (i) => {
602
+ Ce.value = i, a("update:viewMode", i);
603
603
  }
604
604
  });
605
- me(pe, (s) => {
606
- s === "table" && j();
605
+ me(pe, (i) => {
606
+ i === "table" && G();
607
607
  });
608
- const be = I(l.showCheckbox);
609
- me(() => l.showCheckbox, (s) => {
610
- be.value = s;
608
+ const he = Y(l.showCheckbox);
609
+ me(() => l.showCheckbox, (i) => {
610
+ he.value = i;
611
611
  });
612
- const he = Q({
613
- get: () => be.value,
614
- set: (s) => {
615
- be.value = s, a("update:showCheckbox", s), s || r();
612
+ const we = Q({
613
+ get: () => he.value,
614
+ set: (i) => {
615
+ he.value = i, a("update:showCheckbox", i), i || s();
616
616
  }
617
617
  });
618
- function $e(s) {
619
- pe.value = s;
618
+ function Ve(i) {
619
+ pe.value = i;
620
620
  }
621
- function Ye(s) {
622
- he.value = s;
621
+ function Ne(i) {
622
+ we.value = i;
623
623
  }
624
- const Re = I(l.columnResizable);
625
- me(() => l.columnResizable, (s) => {
626
- Re.value = s;
624
+ const Ae = Y(l.columnResizable);
625
+ me(() => l.columnResizable, (i) => {
626
+ Ae.value = i;
627
627
  });
628
- const Ve = Q({
629
- get: () => Re.value,
630
- set: (s) => {
631
- Re.value = s, a("update:columnResizable", s);
628
+ const Fe = Q({
629
+ get: () => Ae.value,
630
+ set: (i) => {
631
+ Ae.value = i, a("update:columnResizable", i);
632
632
  }
633
633
  });
634
- function Ne(s) {
635
- Ve.value = s;
634
+ function qe(i) {
635
+ Fe.value = i;
636
636
  }
637
- const De = I(l.stickyHeader);
638
- me(() => l.stickyHeader, (s) => {
639
- De.value = s;
637
+ const De = Y(l.stickyHeader);
638
+ me(() => l.stickyHeader, (i) => {
639
+ De.value = i;
640
640
  });
641
- const Ae = Q({
641
+ const Re = Q({
642
642
  get: () => De.value,
643
- set: (s) => {
644
- De.value = s, a("update:stickyHeader", s);
643
+ set: (i) => {
644
+ De.value = i, a("update:stickyHeader", i);
645
645
  }
646
646
  });
647
- function qe(s) {
648
- Ae.value = s;
647
+ function Oe(i) {
648
+ Re.value = i;
649
649
  }
650
- const Oe = Vt(), Ue = Q(
651
- () => Object.keys(Oe).filter((s) => s !== "_" && typeof Oe[s] == "function")
650
+ const Ue = At(), Le = Q(
651
+ () => Object.keys(Ue).filter((i) => i !== "_" && typeof Ue[i] == "function")
652
652
  );
653
- function ze() {
654
- var s;
655
- (s = oe.value) == null || s.openDialog();
653
+ function Ee() {
654
+ var i;
655
+ (i = ee.value) == null || i.openDialog();
656
656
  }
657
- function Me() {
658
- var s;
659
- (s = de.value) == null || s.openExportDialog();
657
+ function Pe() {
658
+ var i;
659
+ (i = se.value) == null || i.openExportDialog();
660
660
  }
661
- function Pe(s, W) {
662
- X(s, !!W);
661
+ function ze(i, J) {
662
+ U(i, !!J);
663
663
  }
664
- const ye = I(null), Ge = Q(
665
- () => ye.value ? Ze(E.value, ye.value.row) : []
664
+ const ge = Y(null), We = Q(
665
+ () => ge.value ? et(E.value, ge.value.row) : []
666
666
  );
667
- function Le(s, W) {
667
+ function He(i, J) {
668
668
  if (E.value.length === 0) return;
669
- s.preventDefault();
670
- const re = 176, J = We(W) * 34 + 8;
671
- ye.value = {
672
- x: Math.min(s.clientX, window.innerWidth - re - 8),
673
- y: Math.min(s.clientY, window.innerHeight - J - 8),
674
- row: W
669
+ i.preventDefault();
670
+ const re = 176, X = Je(J) * 34 + 8;
671
+ ge.value = {
672
+ x: Math.min(i.clientX, window.innerWidth - re - 8),
673
+ y: Math.min(i.clientY, window.innerHeight - X - 8),
674
+ row: J
675
675
  };
676
676
  }
677
- function We(s) {
678
- return Ze(E.value, s).length;
677
+ function Je(i) {
678
+ return et(E.value, i).length;
679
679
  }
680
- function d(s) {
680
+ function c(i) {
681
681
  var re;
682
- const W = (re = ye.value) == null ? void 0 : re.row;
683
- ye.value = null, W && s.execute(W, te);
682
+ const J = (re = ge.value) == null ? void 0 : re.row;
683
+ ge.value = null, J && i.execute(J, le);
684
684
  }
685
- function V(s) {
686
- s.key === "Escape" && (ye.value = null);
685
+ function M(i) {
686
+ i.key === "Escape" && (ge.value = null);
687
687
  }
688
- Fe(() => window.addEventListener("keydown", V)), je(() => window.removeEventListener("keydown", V)), f({
688
+ Me(() => window.addEventListener("keydown", M)), Ge(() => window.removeEventListener("keydown", M)), m({
689
689
  meta: k,
690
- paged: u,
690
+ paged: r,
691
691
  currentPage: S,
692
692
  viewMode: pe,
693
- selectable: he,
694
- columnResizable: Ve,
695
- stickyHeader: Ae,
696
- slotNames: Ue,
693
+ selectable: we,
694
+ columnResizable: Fe,
695
+ stickyHeader: Re,
696
+ slotNames: Le,
697
697
  selectedRows: _,
698
- rows: A,
699
- reload: ne,
700
- refresh: ge,
701
- setViewMode: $e,
702
- setSelectable: Ye,
703
- setColumnResizable: Ne,
704
- setStickyHeader: qe,
705
- clearSelection: r,
706
- selectAllOnPage: m,
698
+ rows: $,
699
+ reload: oe,
700
+ refresh: ke,
701
+ setViewMode: Ve,
702
+ setSelectable: Ne,
703
+ setColumnResizable: qe,
704
+ setStickyHeader: Oe,
705
+ clearSelection: s,
706
+ selectAllOnPage: v,
707
707
  invertSelectionOnPage: F,
708
- openConfigDialog: ze,
709
- openExportDialog: Me
708
+ openConfigDialog: Ee,
709
+ openExportDialog: Pe
710
710
  });
711
- const te = {
711
+ const le = {
712
712
  get meta() {
713
713
  return k.value;
714
714
  },
715
715
  get paged() {
716
- return u.value;
716
+ return r.value;
717
717
  },
718
718
  get currentPage() {
719
719
  return S.value;
@@ -722,261 +722,261 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
722
722
  return pe.value;
723
723
  },
724
724
  get selectable() {
725
- return he.value;
725
+ return we.value;
726
726
  },
727
727
  get columnResizable() {
728
- return Ve.value;
728
+ return Fe.value;
729
729
  },
730
730
  get stickyHeader() {
731
- return Ae.value;
731
+ return Re.value;
732
732
  },
733
733
  get slotNames() {
734
- return Ue.value;
734
+ return Le.value;
735
735
  },
736
736
  get selectedRows() {
737
737
  return _.value;
738
738
  },
739
739
  get rows() {
740
- return A.value;
740
+ return $.value;
741
741
  },
742
- reload: ne,
743
- refresh: ge,
744
- setViewMode: $e,
745
- setSelectable: Ye,
746
- setColumnResizable: Ne,
747
- setStickyHeader: qe,
748
- clearSelection: r,
749
- selectAllOnPage: m,
742
+ reload: oe,
743
+ refresh: ke,
744
+ setViewMode: Ve,
745
+ setSelectable: Ne,
746
+ setColumnResizable: qe,
747
+ setStickyHeader: Oe,
748
+ clearSelection: s,
749
+ selectAllOnPage: v,
750
750
  invertSelectionOnPage: F,
751
- openConfigDialog: ze,
752
- openExportDialog: Me
751
+ openConfigDialog: Ee,
752
+ openExportDialog: Pe
753
753
  };
754
- return (s, W) => {
755
- var _e;
756
- const re = w("el-table-column"), ke = w("el-table"), J = w("el-pagination");
757
- return n(), v("div", yl, [
758
- p("div", gl, [
759
- pe.value === "table" ? (n(), v("div", {
754
+ return (i, J) => {
755
+ var be;
756
+ const re = C("el-table-column"), _e = C("el-table"), X = C("el-pagination");
757
+ return n(), g("div", Cl, [
758
+ y("div", Sl, [
759
+ pe.value === "table" ? (n(), g("div", {
760
760
  key: 0,
761
- class: Se(["yk-table__table-wrap", { "yk-table__table-wrap--sticky-header": Ae.value }])
761
+ class: $e(["yk-table__table-wrap", { "yk-table__table-wrap--sticky-header": Re.value }])
762
762
  }, [
763
- c(ke, {
763
+ p(_e, {
764
764
  ref_key: "tableEl",
765
765
  ref: b,
766
- data: i(A),
766
+ data: u($),
767
767
  "row-key": e.rowKey,
768
768
  border: "",
769
- onSelectionChange: i(q),
770
- onHeaderDragend: K
769
+ onSelectionChange: u(N),
770
+ onHeaderDragend: W
771
771
  }, Be({
772
772
  default: o(() => [
773
- he.value ? (n(), h(re, {
773
+ we.value ? (n(), h(re, {
774
774
  key: 0,
775
775
  type: "selection",
776
776
  width: "48"
777
- })) : M("", !0),
778
- (n(!0), v(N, null, Z($.value, (ie) => (n(), h(re, {
779
- key: ie.propertyPath,
780
- prop: ie.propertyPath,
781
- label: ie.displayName,
782
- width: ie.width,
783
- resizable: Ve.value,
777
+ })) : R("", !0),
778
+ (n(!0), g(L, null, te(w.value, (ce) => (n(), h(re, {
779
+ key: ce.propertyPath,
780
+ prop: ce.propertyPath,
781
+ label: ce.displayName,
782
+ width: ce.width,
783
+ resizable: Fe.value,
784
784
  "show-overflow-tooltip": ""
785
785
  }, Be({ _: 2 }, [
786
- ie.render ? {
786
+ ce.render ? {
787
787
  name: "default",
788
- fn: o(({ row: we }) => [
789
- (n(), h(Te(() => ie.render(we, we[ie.propertyPath]))))
788
+ fn: o(({ row: xe }) => [
789
+ (n(), h(Qe(() => ce.render(xe, xe[ce.propertyPath]))))
790
790
  ]),
791
791
  key: "0"
792
792
  } : void 0
793
793
  ]), 1032, ["prop", "label", "width", "resizable"]))), 128)),
794
- l.rowActionsFunc ? (n(), h(tl, {
794
+ l.rowActionsFunc ? (n(), h(ul, {
795
795
  key: 1,
796
- actions: i(E),
797
- table: te,
798
- resizable: Ve.value
799
- }, null, 8, ["actions", "resizable"])) : M("", !0)
796
+ actions: u(E),
797
+ table: le,
798
+ resizable: Fe.value
799
+ }, null, 8, ["actions", "resizable"])) : R("", !0)
800
800
  ]),
801
801
  _: 2
802
802
  }, [
803
- s.$slots.empty ? {
803
+ i.$slots.empty ? {
804
804
  name: "empty",
805
805
  fn: o(() => [
806
- le(s.$slots, "empty", {}, void 0, !0)
806
+ ne(i.$slots, "empty", {}, void 0, !0)
807
807
  ]),
808
808
  key: "0"
809
809
  } : void 0
810
810
  ]), 1032, ["data", "row-key", "onSelectionChange"])
811
- ], 2)) : pe.value === "card" ? (n(), h(sl, {
811
+ ], 2)) : pe.value === "card" ? (n(), h(fl, {
812
812
  key: 1,
813
- rows: i(A),
813
+ rows: u($),
814
814
  "row-key": e.rowKey,
815
- "show-checkbox": he.value,
816
- loading: H.value,
817
- "has-actions": i(E).length > 0,
818
- "is-selected": i(T),
819
- onCheck: Pe,
820
- onContextmenu: Le
815
+ "show-checkbox": we.value,
816
+ loading: B.value,
817
+ "has-actions": u(E).length > 0,
818
+ "is-selected": u(T),
819
+ onCheck: ze,
820
+ onContextmenu: He
821
821
  }, Be({ _: 2 }, [
822
- s.$slots.card ? {
822
+ i.$slots.card ? {
823
823
  name: "default",
824
- fn: o(({ row: ie, index: we }) => [
825
- le(s.$slots, "card", {
826
- row: ie,
827
- index: we
824
+ fn: o(({ row: ce, index: xe }) => [
825
+ ne(i.$slots, "card", {
826
+ row: ce,
827
+ index: xe
828
828
  }, void 0, !0)
829
829
  ]),
830
830
  key: "0"
831
831
  } : void 0,
832
- s.$slots.empty ? {
832
+ i.$slots.empty ? {
833
833
  name: "empty",
834
834
  fn: o(() => [
835
- le(s.$slots, "empty", {}, void 0, !0)
835
+ ne(i.$slots, "empty", {}, void 0, !0)
836
836
  ]),
837
837
  key: "1"
838
838
  } : void 0
839
- ]), 1032, ["rows", "row-key", "show-checkbox", "loading", "has-actions", "is-selected"])) : (n(), h(pl, {
839
+ ]), 1032, ["rows", "row-key", "show-checkbox", "loading", "has-actions", "is-selected"])) : (n(), h(bl, {
840
840
  key: 2,
841
- rows: i(A),
841
+ rows: u($),
842
842
  "row-key": e.rowKey,
843
- "show-checkbox": he.value,
844
- loading: H.value,
845
- "has-actions": i(E).length > 0,
846
- "is-selected": i(T),
847
- onCheck: Pe,
848
- onContextmenu: Le
843
+ "show-checkbox": we.value,
844
+ loading: B.value,
845
+ "has-actions": u(E).length > 0,
846
+ "is-selected": u(T),
847
+ onCheck: ze,
848
+ onContextmenu: He
849
849
  }, Be({ _: 2 }, [
850
- s.$slots.list ? {
850
+ i.$slots.list ? {
851
851
  name: "default",
852
- fn: o(({ row: ie, index: we }) => [
853
- le(s.$slots, "list", {
854
- row: ie,
855
- index: we
852
+ fn: o(({ row: ce, index: xe }) => [
853
+ ne(i.$slots, "list", {
854
+ row: ce,
855
+ index: xe
856
856
  }, void 0, !0)
857
857
  ]),
858
858
  key: "0"
859
859
  } : void 0,
860
- s.$slots.empty ? {
860
+ i.$slots.empty ? {
861
861
  name: "empty",
862
862
  fn: o(() => [
863
- le(s.$slots, "empty", {}, void 0, !0)
863
+ ne(i.$slots, "empty", {}, void 0, !0)
864
864
  ]),
865
865
  key: "1"
866
866
  } : void 0
867
867
  ]), 1032, ["rows", "row-key", "show-checkbox", "loading", "has-actions", "is-selected"])),
868
- c(Ft, { name: "yk-loading-fade" }, {
868
+ p(Rt, { name: "yk-loading-fade" }, {
869
869
  default: o(() => [
870
- H.value ? (n(), v("div", kl, [
871
- le(s.$slots, "loading", {}, () => [
872
- W[1] || (W[1] = p("span", {
870
+ B.value ? (n(), g("div", $l, [
871
+ ne(i.$slots, "loading", {}, () => [
872
+ J[1] || (J[1] = y("span", {
873
873
  class: "yk-table__loading-spinner",
874
874
  "aria-label": "加载中"
875
875
  }, null, -1))
876
876
  ], !0)
877
- ])) : M("", !0)
877
+ ])) : R("", !0)
878
878
  ]),
879
879
  _: 3
880
880
  })
881
881
  ]),
882
- c(vl, {
883
- menu: ye.value,
884
- actions: Ge.value,
885
- "is-enabled": i(pt),
886
- onClose: W[0] || (W[0] = (ie) => ye.value = null),
887
- onSelect: d
882
+ p(xl, {
883
+ menu: ge.value,
884
+ actions: We.value,
885
+ "is-enabled": u(vt),
886
+ onClose: J[0] || (J[0] = (ce) => ge.value = null),
887
+ onSelect: c
888
888
  }, null, 8, ["menu", "actions", "is-enabled"]),
889
- z.value || s.$slots.footer ? (n(), v("div", _l, [
890
- p("div", bl, [
891
- le(s.$slots, "footer", {}, void 0, !0)
889
+ I.value || i.$slots.footer ? (n(), g("div", Vl, [
890
+ y("div", Fl, [
891
+ ne(i.$slots, "footer", {}, void 0, !0)
892
892
  ]),
893
- z.value ? (n(), h(J, {
893
+ I.value ? (n(), h(X, {
894
894
  key: 0,
895
895
  class: "yk-table__pagination",
896
- layout: i(U) ? "total, sizes, prev, pager, next" : "sizes, prev, pager, next",
897
- total: i(B),
896
+ layout: u(H) ? "total, sizes, prev, pager, next" : "sizes, prev, pager, next",
897
+ total: u(P),
898
898
  "page-sizes": e.pageSizes,
899
- "page-size": g.value,
900
- "current-page": i(S),
901
- onCurrentChange: L,
902
- onSizeChange: se
903
- }, null, 8, ["layout", "total", "page-sizes", "page-size", "current-page"])) : M("", !0)
904
- ])) : M("", !0),
905
- c(Jt, {
899
+ "page-size": d.value,
900
+ "current-page": u(S),
901
+ onCurrentChange: O,
902
+ onSizeChange: ie
903
+ }, null, 8, ["layout", "total", "page-sizes", "page-size", "current-page"])) : R("", !0)
904
+ ])) : R("", !0),
905
+ p(al, {
906
906
  ref_key: "exportDialogRef",
907
- ref: de,
908
- "current-rows": i(A),
909
- "selected-rows": i(_),
907
+ ref: se,
908
+ "current-rows": u($),
909
+ "selected-rows": u(_),
910
910
  "data-fun": l.dataFun,
911
911
  "export-page-size": l.exportPageSize,
912
- total: i(B),
912
+ total: u(P),
913
913
  "exportor-func": l.exportorFunc,
914
- "table-name": ((_e = i(k)) == null ? void 0 : _e.displayName) ?? "数据",
915
- columns: $.value,
916
- "has-more-page": z.value,
917
- "export-selected": he.value
914
+ "table-name": ((be = u(k)) == null ? void 0 : be.displayName) ?? "数据",
915
+ columns: w.value,
916
+ "has-more-page": I.value,
917
+ "export-selected": we.value
918
918
  }, null, 8, ["current-rows", "selected-rows", "data-fun", "export-page-size", "total", "exportor-func", "table-name", "columns", "has-more-page", "export-selected"]),
919
- c(Zt, {
919
+ p(il, {
920
920
  ref_key: "configDialogRef",
921
- ref: oe,
921
+ ref: ee,
922
922
  "load-custom-config-fun": e.loadCustomConfigFun,
923
923
  "save-custom-config-fun": e.saveCustomConfigFun,
924
- meta: i(k)
924
+ meta: u(k)
925
925
  }, null, 8, ["load-custom-config-fun", "save-custom-config-fun", "meta"])
926
926
  ]);
927
927
  };
928
928
  }
929
- }), yt = /* @__PURE__ */ ae(hl, [["__scopeId", "data-v-6efda66a"]]), wl = { class: "yk-table-action-menu-button__check" }, xl = { class: "yk-table-action-menu-button__check" }, Cl = { class: "yk-table-action-menu-button__check" }, Sl = { class: "yk-table-action-menu-button__check" }, $l = { class: "yk-table-action-menu-button__check" }, Vl = { class: "yk-table-action-menu-button__check" }, Fl = /* @__PURE__ */ ee({
929
+ }), _t = /* @__PURE__ */ ae(Ml, [["__scopeId", "data-v-6efda66a"]]), Al = { class: "yk-table-action-menu-button__check" }, Rl = { class: "yk-table-action-menu-button__check" }, Pl = { class: "yk-table-action-menu-button__check" }, zl = { class: "yk-table-action-menu-button__check" }, Bl = { class: "yk-table-action-menu-button__check" }, Dl = { class: "yk-table-action-menu-button__check" }, El = /* @__PURE__ */ Z({
930
930
  __name: "tableActionMenuButton",
931
931
  props: {
932
932
  table: {}
933
933
  },
934
934
  setup(e) {
935
- const f = e;
935
+ const m = e;
936
936
  function t(l) {
937
937
  switch (l) {
938
938
  case "refresh":
939
- f.table.refresh();
939
+ m.table.refresh();
940
940
  break;
941
941
  case "config":
942
- f.table.openConfigDialog();
942
+ m.table.openConfigDialog();
943
943
  break;
944
944
  case "export":
945
- f.table.openExportDialog();
945
+ m.table.openExportDialog();
946
946
  break;
947
947
  case "view-table":
948
- f.table.setViewMode("table");
948
+ m.table.setViewMode("table");
949
949
  break;
950
950
  case "view-card":
951
- f.table.setViewMode("card");
951
+ m.table.setViewMode("card");
952
952
  break;
953
953
  case "view-list":
954
- f.table.setViewMode("list");
954
+ m.table.setViewMode("list");
955
955
  break;
956
956
  case "toggle-checkbox":
957
- f.table.setSelectable(!f.table.selectable);
957
+ m.table.setSelectable(!m.table.selectable);
958
958
  break;
959
959
  case "toggle-column-resize":
960
- f.table.setColumnResizable(!f.table.columnResizable);
960
+ m.table.setColumnResizable(!m.table.columnResizable);
961
961
  break;
962
962
  case "toggle-sticky-header":
963
- f.table.setStickyHeader(!f.table.stickyHeader);
963
+ m.table.setStickyHeader(!m.table.stickyHeader);
964
964
  break;
965
965
  }
966
966
  }
967
967
  return (l, a) => {
968
- const k = w("el-button"), u = w("el-dropdown-item"), A = w("el-dropdown-menu"), y = w("el-dropdown");
969
- return n(), h(y, {
968
+ const k = C("el-button"), r = C("el-dropdown-item"), $ = C("el-dropdown-menu"), f = C("el-dropdown");
969
+ return n(), h(f, {
970
970
  trigger: "click",
971
971
  placement: "bottom-end",
972
972
  onCommand: t
973
973
  }, {
974
974
  dropdown: o(() => [
975
- c(A, null, {
975
+ p($, null, {
976
976
  default: o(() => [
977
- c(u, { command: "refresh" }, {
977
+ p(r, { command: "refresh" }, {
978
978
  default: o(() => [...a[1] || (a[1] = [
979
- p("svg", {
979
+ y("svg", {
980
980
  viewBox: "0 0 24 24",
981
981
  width: "14",
982
982
  height: "14",
@@ -987,17 +987,17 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
987
987
  "stroke-linejoin": "round",
988
988
  class: "yk-table-action-menu-button__icon"
989
989
  }, [
990
- p("polyline", { points: "23 4 23 10 17 10" }),
991
- p("polyline", { points: "1 20 1 14 7 14" }),
992
- p("path", { d: "M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15" })
990
+ y("polyline", { points: "23 4 23 10 17 10" }),
991
+ y("polyline", { points: "1 20 1 14 7 14" }),
992
+ y("path", { d: "M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15" })
993
993
  ], -1),
994
- C(" 刷新 ", -1)
994
+ V(" 刷新 ", -1)
995
995
  ])]),
996
996
  _: 1
997
997
  }),
998
- c(u, { command: "export" }, {
998
+ p(r, { command: "export" }, {
999
999
  default: o(() => [...a[2] || (a[2] = [
1000
- p("svg", {
1000
+ y("svg", {
1001
1001
  viewBox: "0 0 24 24",
1002
1002
  width: "14",
1003
1003
  height: "14",
@@ -1008,22 +1008,22 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
1008
1008
  "stroke-linejoin": "round",
1009
1009
  class: "yk-table-action-menu-button__icon"
1010
1010
  }, [
1011
- p("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
1012
- p("polyline", { points: "7 10 12 15 17 10" }),
1013
- p("line", {
1011
+ y("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
1012
+ y("polyline", { points: "7 10 12 15 17 10" }),
1013
+ y("line", {
1014
1014
  x1: "12",
1015
1015
  y1: "15",
1016
1016
  x2: "12",
1017
1017
  y2: "3"
1018
1018
  })
1019
1019
  ], -1),
1020
- C(" 导出 Excel ", -1)
1020
+ V(" 导出 Excel ", -1)
1021
1021
  ])]),
1022
1022
  _: 1
1023
1023
  }),
1024
- c(u, { command: "config" }, {
1024
+ p(r, { command: "config" }, {
1025
1025
  default: o(() => [...a[3] || (a[3] = [
1026
- p("svg", {
1026
+ y("svg", {
1027
1027
  viewBox: "0 0 24 24",
1028
1028
  width: "14",
1029
1029
  height: "14",
@@ -1034,68 +1034,68 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
1034
1034
  "stroke-linejoin": "round",
1035
1035
  class: "yk-table-action-menu-button__icon"
1036
1036
  }, [
1037
- p("circle", {
1037
+ y("circle", {
1038
1038
  cx: "12",
1039
1039
  cy: "12",
1040
1040
  r: "3"
1041
1041
  }),
1042
- p("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z" })
1042
+ y("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z" })
1043
1043
  ], -1),
1044
- C(" 列设置 ", -1)
1044
+ V(" 列设置 ", -1)
1045
1045
  ])]),
1046
1046
  _: 1
1047
1047
  }),
1048
- c(u, {
1048
+ p(r, {
1049
1049
  command: "view-table",
1050
1050
  divided: ""
1051
1051
  }, {
1052
1052
  default: o(() => [
1053
- p("span", wl, P(e.table.viewMode === "table" ? "✓" : ""), 1),
1054
- a[4] || (a[4] = C("表格视图 ", -1))
1053
+ y("span", Al, z(e.table.viewMode === "table" ? "✓" : ""), 1),
1054
+ a[4] || (a[4] = V("表格视图 ", -1))
1055
1055
  ]),
1056
1056
  _: 1
1057
1057
  }),
1058
- e.table.slotNames.includes("card") ? (n(), h(u, {
1058
+ e.table.slotNames.includes("card") ? (n(), h(r, {
1059
1059
  key: 0,
1060
1060
  command: "view-card"
1061
1061
  }, {
1062
1062
  default: o(() => [
1063
- p("span", xl, P(e.table.viewMode === "card" ? "✓" : ""), 1),
1064
- a[5] || (a[5] = C("卡片视图 ", -1))
1063
+ y("span", Rl, z(e.table.viewMode === "card" ? "✓" : ""), 1),
1064
+ a[5] || (a[5] = V("卡片视图 ", -1))
1065
1065
  ]),
1066
1066
  _: 1
1067
- })) : M("", !0),
1068
- e.table.slotNames.includes("list") ? (n(), h(u, {
1067
+ })) : R("", !0),
1068
+ e.table.slotNames.includes("list") ? (n(), h(r, {
1069
1069
  key: 1,
1070
1070
  command: "view-list"
1071
1071
  }, {
1072
1072
  default: o(() => [
1073
- p("span", Cl, P(e.table.viewMode === "list" ? "✓" : ""), 1),
1074
- a[6] || (a[6] = C("列表视图 ", -1))
1073
+ y("span", Pl, z(e.table.viewMode === "list" ? "✓" : ""), 1),
1074
+ a[6] || (a[6] = V("列表视图 ", -1))
1075
1075
  ]),
1076
1076
  _: 1
1077
- })) : M("", !0),
1078
- c(u, {
1077
+ })) : R("", !0),
1078
+ p(r, {
1079
1079
  command: "toggle-checkbox",
1080
1080
  divided: ""
1081
1081
  }, {
1082
1082
  default: o(() => [
1083
- p("span", Sl, P(e.table.selectable ? "✓" : ""), 1),
1084
- a[7] || (a[7] = C("选择行 ", -1))
1083
+ y("span", zl, z(e.table.selectable ? "✓" : ""), 1),
1084
+ a[7] || (a[7] = V("选择行 ", -1))
1085
1085
  ]),
1086
1086
  _: 1
1087
1087
  }),
1088
- c(u, { command: "toggle-column-resize" }, {
1088
+ p(r, { command: "toggle-column-resize" }, {
1089
1089
  default: o(() => [
1090
- p("span", $l, P(e.table.columnResizable ? "✓" : ""), 1),
1091
- a[8] || (a[8] = C("列宽拖动 ", -1))
1090
+ y("span", Bl, z(e.table.columnResizable ? "✓" : ""), 1),
1091
+ a[8] || (a[8] = V("列宽拖动 ", -1))
1092
1092
  ]),
1093
1093
  _: 1
1094
1094
  }),
1095
- c(u, { command: "toggle-sticky-header" }, {
1095
+ p(r, { command: "toggle-sticky-header" }, {
1096
1096
  default: o(() => [
1097
- p("span", Vl, P(e.table.stickyHeader ? "✓" : ""), 1),
1098
- a[9] || (a[9] = C("锁定表头 ", -1))
1097
+ y("span", Dl, z(e.table.stickyHeader ? "✓" : ""), 1),
1098
+ a[9] || (a[9] = V("锁定表头 ", -1))
1099
1099
  ]),
1100
1100
  _: 1
1101
1101
  })
@@ -1104,14 +1104,14 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
1104
1104
  })
1105
1105
  ]),
1106
1106
  default: o(() => [
1107
- le(l.$slots, "trigger", {}, () => [
1108
- c(k, {
1107
+ ne(l.$slots, "trigger", {}, () => [
1108
+ p(k, {
1109
1109
  class: "yk-table-action-menu-button__btn",
1110
1110
  title: "表格操作",
1111
1111
  "aria-label": "表格操作"
1112
1112
  }, {
1113
1113
  default: o(() => [...a[0] || (a[0] = [
1114
- p("svg", {
1114
+ y("svg", {
1115
1115
  viewBox: "0 0 24 24",
1116
1116
  width: "16",
1117
1117
  height: "16",
@@ -1120,37 +1120,37 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
1120
1120
  "stroke-width": "2",
1121
1121
  "stroke-linecap": "round"
1122
1122
  }, [
1123
- p("line", {
1123
+ y("line", {
1124
1124
  x1: "3",
1125
1125
  y1: "6",
1126
1126
  x2: "21",
1127
1127
  y2: "6"
1128
1128
  }),
1129
- p("circle", {
1129
+ y("circle", {
1130
1130
  cx: "9",
1131
1131
  cy: "6",
1132
1132
  r: "2.4",
1133
1133
  fill: "var(--el-bg-color, #fff)"
1134
1134
  }),
1135
- p("line", {
1135
+ y("line", {
1136
1136
  x1: "3",
1137
1137
  y1: "12",
1138
1138
  x2: "21",
1139
1139
  y2: "12"
1140
1140
  }),
1141
- p("circle", {
1141
+ y("circle", {
1142
1142
  cx: "15",
1143
1143
  cy: "12",
1144
1144
  r: "2.4",
1145
1145
  fill: "var(--el-bg-color, #fff)"
1146
1146
  }),
1147
- p("line", {
1147
+ y("line", {
1148
1148
  x1: "3",
1149
1149
  y1: "18",
1150
1150
  x2: "21",
1151
1151
  y2: "18"
1152
1152
  }),
1153
- p("circle", {
1153
+ y("circle", {
1154
1154
  cx: "9",
1155
1155
  cy: "18",
1156
1156
  r: "2.4",
@@ -1166,59 +1166,59 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
1166
1166
  });
1167
1167
  };
1168
1168
  }
1169
- }), gt = /* @__PURE__ */ ae(Fl, [["__scopeId", "data-v-fffcf297"]]), Rl = {
1169
+ }), bt = /* @__PURE__ */ ae(El, [["__scopeId", "data-v-fffcf297"]]), Il = {
1170
1170
  key: 0,
1171
1171
  class: "yk-table__selection-bar"
1172
- }, Al = { class: "yk-table__selection-bar__count" }, Ml = /* @__PURE__ */ ee({
1172
+ }, Tl = { class: "yk-table__selection-bar__count" }, Ql = /* @__PURE__ */ Z({
1173
1173
  __name: "selectionBar",
1174
1174
  props: {
1175
1175
  count: {}
1176
1176
  },
1177
1177
  emits: ["select-all", "invert", "clear"],
1178
1178
  setup(e) {
1179
- return (f, t) => {
1180
- const l = w("el-button");
1181
- return e.count > 0 ? (n(), v("div", Rl, [
1182
- p("span", Al, "已选 " + P(e.count) + " 项", 1),
1183
- t[6] || (t[6] = p("span", { class: "yk-table__selection-bar__sep" }, "|", -1)),
1184
- c(l, {
1179
+ return (m, t) => {
1180
+ const l = C("el-button");
1181
+ return e.count > 0 ? (n(), g("div", Il, [
1182
+ y("span", Tl, "已选 " + z(e.count) + " 项", 1),
1183
+ t[6] || (t[6] = y("span", { class: "yk-table__selection-bar__sep" }, "|", -1)),
1184
+ p(l, {
1185
1185
  link: "",
1186
1186
  type: "primary",
1187
1187
  class: "yk-table__selection-bar__btn",
1188
- onClick: t[0] || (t[0] = (a) => f.$emit("select-all"))
1188
+ onClick: t[0] || (t[0] = (a) => m.$emit("select-all"))
1189
1189
  }, {
1190
1190
  default: o(() => [...t[3] || (t[3] = [
1191
- C("全选", -1)
1191
+ V("全选", -1)
1192
1192
  ])]),
1193
1193
  _: 1
1194
1194
  }),
1195
- c(l, {
1195
+ p(l, {
1196
1196
  link: "",
1197
1197
  type: "primary",
1198
1198
  class: "yk-table__selection-bar__btn",
1199
- onClick: t[1] || (t[1] = (a) => f.$emit("invert"))
1199
+ onClick: t[1] || (t[1] = (a) => m.$emit("invert"))
1200
1200
  }, {
1201
1201
  default: o(() => [...t[4] || (t[4] = [
1202
- C("反选", -1)
1202
+ V("反选", -1)
1203
1203
  ])]),
1204
1204
  _: 1
1205
1205
  }),
1206
- t[7] || (t[7] = p("span", { class: "yk-table__selection-bar__sep" }, "|", -1)),
1207
- c(l, {
1206
+ t[7] || (t[7] = y("span", { class: "yk-table__selection-bar__sep" }, "|", -1)),
1207
+ p(l, {
1208
1208
  link: "",
1209
1209
  type: "primary",
1210
1210
  class: "yk-table__selection-bar__btn",
1211
- onClick: t[2] || (t[2] = (a) => f.$emit("clear"))
1211
+ onClick: t[2] || (t[2] = (a) => m.$emit("clear"))
1212
1212
  }, {
1213
1213
  default: o(() => [...t[5] || (t[5] = [
1214
- C("清空", -1)
1214
+ V("清空", -1)
1215
1215
  ])]),
1216
1216
  _: 1
1217
1217
  })
1218
- ])) : M("", !0);
1218
+ ])) : R("", !0);
1219
1219
  };
1220
1220
  }
1221
- }), Pl = /* @__PURE__ */ ae(Ml, [["__scopeId", "data-v-3f40dafb"]]), Bl = { class: "yk-command-bar" }, Dl = { class: "yk-command-bar__actions" }, zl = /* @__PURE__ */ ee({
1221
+ }), Yl = /* @__PURE__ */ ae(Ql, [["__scopeId", "data-v-3f40dafb"]]), Nl = { class: "yk-command-bar" }, ql = { class: "yk-command-bar__actions" }, Ol = /* @__PURE__ */ Z({
1222
1222
  __name: "commandBar",
1223
1223
  props: {
1224
1224
  /** 表级命令列表,每条渲染为一个 el-button(type/plain/icon/desc),click 调 execute(table) */
@@ -1229,79 +1229,79 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
1229
1229
  showActionMenuButton: { type: Boolean, default: !0 }
1230
1230
  },
1231
1231
  setup(e) {
1232
- const f = e;
1232
+ const m = e;
1233
1233
  return (t, l) => {
1234
- const a = w("el-button");
1235
- return n(), v("div", Bl, [
1236
- p("div", Dl, [
1237
- (n(!0), v(N, null, Z(f.actions, (k) => (n(), h(a, {
1234
+ const a = C("el-button");
1235
+ return n(), g("div", Nl, [
1236
+ y("div", ql, [
1237
+ (n(!0), g(L, null, te(m.actions, (k) => (n(), h(a, {
1238
1238
  key: k.name,
1239
1239
  type: k.type === "default" ? void 0 : k.type,
1240
1240
  plain: k.plain,
1241
- onClick: (u) => f.table && k.execute(f.table)
1241
+ onClick: (r) => m.table && k.execute(m.table)
1242
1242
  }, {
1243
1243
  default: o(() => [
1244
- k.icon ? (n(), h(Te(k.icon), {
1244
+ k.icon ? (n(), h(Qe(k.icon), {
1245
1245
  key: 0,
1246
1246
  class: "yk-command-bar__icon"
1247
- })) : M("", !0),
1248
- C(" " + P(k.desc), 1)
1247
+ })) : R("", !0),
1248
+ V(" " + z(k.desc), 1)
1249
1249
  ]),
1250
1250
  _: 2
1251
1251
  }, 1032, ["type", "plain", "onClick"]))), 128)),
1252
- f.table ? (n(), h(Pl, {
1252
+ m.table ? (n(), h(Yl, {
1253
1253
  key: 0,
1254
- count: f.table.selectedRows.length,
1254
+ count: m.table.selectedRows.length,
1255
1255
  onSelectAll: l[0] || (l[0] = (k) => {
1256
- var u;
1257
- return (u = f.table) == null ? void 0 : u.selectAllOnPage();
1256
+ var r;
1257
+ return (r = m.table) == null ? void 0 : r.selectAllOnPage();
1258
1258
  }),
1259
1259
  onInvert: l[1] || (l[1] = (k) => {
1260
- var u;
1261
- return (u = f.table) == null ? void 0 : u.invertSelectionOnPage();
1260
+ var r;
1261
+ return (r = m.table) == null ? void 0 : r.invertSelectionOnPage();
1262
1262
  }),
1263
1263
  onClear: l[2] || (l[2] = (k) => {
1264
- var u;
1265
- return (u = f.table) == null ? void 0 : u.clearSelection();
1264
+ var r;
1265
+ return (r = m.table) == null ? void 0 : r.clearSelection();
1266
1266
  })
1267
- }, null, 8, ["count"])) : M("", !0),
1268
- le(t.$slots, "default", {}, void 0, !0)
1267
+ }, null, 8, ["count"])) : R("", !0),
1268
+ ne(t.$slots, "default", {}, void 0, !0)
1269
1269
  ]),
1270
- f.showActionMenuButton && f.table ? (n(), h(gt, {
1270
+ m.showActionMenuButton && m.table ? (n(), h(bt, {
1271
1271
  key: 0,
1272
- table: f.table,
1272
+ table: m.table,
1273
1273
  class: "yk-command-bar__menu"
1274
- }, null, 8, ["table"])) : M("", !0)
1274
+ }, null, 8, ["table"])) : R("", !0)
1275
1275
  ]);
1276
1276
  };
1277
1277
  }
1278
- }), kt = /* @__PURE__ */ ae(zl, [["__scopeId", "data-v-cd091888"]]), Ql = {
1278
+ }), ht = /* @__PURE__ */ ae(Ol, [["__scopeId", "data-v-cd091888"]]), Ul = {
1279
1279
  key: 0,
1280
1280
  class: "ys-main-panel__menu-icon"
1281
- }, El = { class: "ys-main-panel__menu-text" }, Tl = {
1281
+ }, Ll = { class: "ys-main-panel__menu-text" }, Hl = {
1282
1282
  key: 0,
1283
1283
  class: "ys-main-panel__menu-icon"
1284
- }, Il = { class: "ys-main-panel__menu-text" }, st = /* @__PURE__ */ ee({
1284
+ }, Kl = { class: "ys-main-panel__menu-text" }, rt = /* @__PURE__ */ Z({
1285
1285
  name: "YsMainPanelMenuNode",
1286
1286
  __name: "mainPanelMenuNode",
1287
1287
  props: {
1288
1288
  node: {}
1289
1289
  },
1290
1290
  setup(e) {
1291
- return (f, t) => {
1292
- const l = w("main-panel-menu-node", !0), a = w("el-sub-menu"), k = w("el-menu-item");
1291
+ return (m, t) => {
1292
+ const l = C("main-panel-menu-node", !0), a = C("el-sub-menu"), k = C("el-menu-item");
1293
1293
  return e.node.children && e.node.children.length > 0 ? (n(), h(a, {
1294
1294
  key: 0,
1295
1295
  index: e.node.key
1296
1296
  }, {
1297
1297
  title: o(() => [
1298
- e.node.icon ? (n(), v("i", Ql, P(e.node.icon), 1)) : M("", !0),
1299
- p("span", El, P(e.node.label), 1)
1298
+ e.node.icon ? (n(), g("i", Ul, z(e.node.icon), 1)) : R("", !0),
1299
+ y("span", Ll, z(e.node.label), 1)
1300
1300
  ]),
1301
1301
  default: o(() => [
1302
- (n(!0), v(N, null, Z(e.node.children, (u) => (n(), h(l, {
1303
- key: u.key,
1304
- node: u
1302
+ (n(!0), g(L, null, te(e.node.children, (r) => (n(), h(l, {
1303
+ key: r.key,
1304
+ node: r
1305
1305
  }, null, 8, ["node"]))), 128))
1306
1306
  ]),
1307
1307
  _: 1
@@ -1310,20 +1310,20 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
1310
1310
  index: e.node.key
1311
1311
  }, {
1312
1312
  default: o(() => [
1313
- e.node.icon ? (n(), v("i", Tl, P(e.node.icon), 1)) : M("", !0),
1314
- p("span", Il, P(e.node.label), 1)
1313
+ e.node.icon ? (n(), g("i", Hl, z(e.node.icon), 1)) : R("", !0),
1314
+ y("span", Kl, z(e.node.label), 1)
1315
1315
  ]),
1316
1316
  _: 1
1317
1317
  }, 8, ["index"]));
1318
1318
  };
1319
1319
  }
1320
- }), Yl = { class: "ys-main-panel" }, Nl = { class: "ys-main-panel__aside-header" }, ql = ["title"], Ol = {
1320
+ }), jl = { class: "ys-main-panel" }, Gl = { class: "ys-main-panel__aside-header" }, Wl = ["title"], Jl = {
1321
1321
  key: 0,
1322
1322
  class: "ys-main-panel__menu-empty"
1323
- }, Ul = { class: "ys-main-panel__main" }, Ll = {
1323
+ }, Xl = { class: "ys-main-panel__main" }, Zl = {
1324
1324
  key: 1,
1325
1325
  class: "ys-main-panel__empty"
1326
- }, Hl = /* @__PURE__ */ ee({
1326
+ }, en = /* @__PURE__ */ Z({
1327
1327
  name: "YsMainPanel",
1328
1328
  __name: "mainPanel",
1329
1329
  props: {
@@ -1347,150 +1347,150 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
1347
1347
  menuKeyword: { type: String, default: "" }
1348
1348
  },
1349
1349
  emits: ["update:menuKeyword"],
1350
- setup(e, { emit: f }) {
1351
- const t = e, l = f, a = I(!1), k = I(t.menuKeyword);
1350
+ setup(e, { emit: m }) {
1351
+ const t = e, l = m, a = Y(!1), k = Y(t.menuKeyword);
1352
1352
  me(
1353
1353
  () => t.menuKeyword,
1354
- (r) => {
1355
- k.value = r;
1354
+ (s) => {
1355
+ k.value = s;
1356
1356
  }
1357
1357
  );
1358
- const u = Q({
1358
+ const r = Q({
1359
1359
  get: () => k.value,
1360
- set: (r) => {
1361
- k.value = r, l("update:menuKeyword", r);
1360
+ set: (s) => {
1361
+ k.value = s, l("update:menuKeyword", s);
1362
1362
  }
1363
- }), A = Q(() => u.value.trim().length > 0), y = Q(() => zt(S.value, u.value)), x = Q(() => Qt(y.value)), { nodes: S, menuLoading: B, loadNodes: U } = Et(t), { openTabs: R, activeKey: b, openTab: _, removeTab: q, getComponent: T } = Tt(t);
1364
- function X(r) {
1365
- const m = nt(S.value, r);
1366
- m && !ot(m) && _(m);
1367
- }
1368
- let j = !1;
1369
- return Fe(async () => {
1370
- if (await U(), !j && t.defaultActive) {
1371
- const r = nt(S.value, t.defaultActive);
1372
- r && !ot(r) && _(r), j = !0;
1363
+ }), $ = Q(() => r.value.trim().length > 0), f = Q(() => Qt(S.value, r.value)), x = Q(() => Yt(f.value)), { nodes: S, menuLoading: P, loadNodes: H } = Nt(t), { openTabs: A, activeKey: b, openTab: _, removeTab: N, getComponent: T } = qt(t);
1364
+ function U(s) {
1365
+ const v = at(S.value, s);
1366
+ v && !st(v) && _(v);
1367
+ }
1368
+ let G = !1;
1369
+ return Me(async () => {
1370
+ if (await H(), !G && t.defaultActive) {
1371
+ const s = at(S.value, t.defaultActive);
1372
+ s && !st(s) && _(s), G = !0;
1373
1373
  }
1374
- }), (r, m) => {
1375
- const F = w("el-input"), Y = w("el-menu"), E = w("el-tab-pane"), ue = w("el-tabs"), ce = w("el-empty"), oe = ut("loading");
1376
- return n(), v("div", Yl, [
1377
- p("aside", {
1378
- class: Se(["ys-main-panel__aside", { "is-collapsed": a.value }])
1374
+ }), (s, v) => {
1375
+ const F = C("el-input"), q = C("el-menu"), E = C("el-tab-pane"), ue = C("el-tabs"), de = C("el-empty"), ee = pt("loading");
1376
+ return n(), g("div", jl, [
1377
+ y("aside", {
1378
+ class: $e(["ys-main-panel__aside", { "is-collapsed": a.value }])
1379
1379
  }, [
1380
- p("div", Nl, [
1381
- p("button", {
1380
+ y("div", Gl, [
1381
+ y("button", {
1382
1382
  class: "ys-main-panel__collapse-btn",
1383
1383
  type: "button",
1384
1384
  title: a.value ? "展开菜单" : "折叠菜单",
1385
- onClick: m[0] || (m[0] = ($) => a.value = !a.value)
1386
- }, "☰", 8, ql),
1385
+ onClick: v[0] || (v[0] = (w) => a.value = !a.value)
1386
+ }, "☰", 8, Wl),
1387
1387
  t.showMenuSearch && !a.value ? (n(), h(F, {
1388
1388
  key: 0,
1389
- modelValue: u.value,
1390
- "onUpdate:modelValue": m[1] || (m[1] = ($) => u.value = $),
1389
+ modelValue: r.value,
1390
+ "onUpdate:modelValue": v[1] || (v[1] = (w) => r.value = w),
1391
1391
  class: "ys-main-panel__aside-search",
1392
1392
  size: "small",
1393
1393
  clearable: "",
1394
1394
  placeholder: "搜索功能",
1395
1395
  "aria-label": "搜索功能"
1396
1396
  }, {
1397
- prefix: o(() => [...m[3] || (m[3] = [
1398
- p("svg", {
1397
+ prefix: o(() => [...v[3] || (v[3] = [
1398
+ y("svg", {
1399
1399
  class: "ys-main-panel__search-icon",
1400
1400
  viewBox: "0 0 1024 1024",
1401
1401
  width: "14",
1402
1402
  height: "14",
1403
1403
  "aria-hidden": "true"
1404
1404
  }, [
1405
- p("path", {
1405
+ y("path", {
1406
1406
  fill: "currentColor",
1407
1407
  d: "M909.098 839.904l-181.22-181.248a341.5 341.5 0 1 0-47.734 48.58l180.56 180.588a33.92 0 0 0 48.394-47.92zM454.4 745.6a291.2 291.2 0 1 1 291.2-291.2 291.2 291.2 0 0 1-291.2 291.2z"
1408
1408
  })
1409
1409
  ], -1)
1410
1410
  ])]),
1411
1411
  _: 1
1412
- }, 8, ["modelValue"])) : M("", !0)
1412
+ }, 8, ["modelValue"])) : R("", !0)
1413
1413
  ]),
1414
- A.value ? Je((n(), h(Y, {
1415
- key: "search-" + u.value,
1416
- "default-active": i(b),
1414
+ $.value ? Xe((n(), h(q, {
1415
+ key: "search-" + r.value,
1416
+ "default-active": u(b),
1417
1417
  "default-openeds": x.value,
1418
1418
  collapse: a.value,
1419
1419
  class: "ys-main-panel__menu",
1420
1420
  "element-loading-background": "transparent",
1421
- onSelect: X
1421
+ onSelect: U
1422
1422
  }, {
1423
1423
  default: o(() => [
1424
- (n(!0), v(N, null, Z(y.value, ($) => (n(), h(st, {
1425
- key: $.key,
1426
- node: $
1424
+ (n(!0), g(L, null, te(f.value, (w) => (n(), h(rt, {
1425
+ key: w.key,
1426
+ node: w
1427
1427
  }, null, 8, ["node"]))), 128)),
1428
- y.value.length === 0 && !i(B) ? (n(), v("div", Ol, " 未找到匹配的功能 ")) : M("", !0)
1428
+ f.value.length === 0 && !u(P) ? (n(), g("div", Jl, " 未找到匹配的功能 ")) : R("", !0)
1429
1429
  ]),
1430
1430
  _: 1
1431
1431
  }, 8, ["default-active", "default-openeds", "collapse"])), [
1432
- [oe, i(B)]
1433
- ]) : Je((n(), h(Y, {
1432
+ [ee, u(P)]
1433
+ ]) : Xe((n(), h(q, {
1434
1434
  key: 1,
1435
- "default-active": i(b),
1435
+ "default-active": u(b),
1436
1436
  collapse: a.value,
1437
1437
  class: "ys-main-panel__menu",
1438
1438
  "element-loading-background": "transparent",
1439
- onSelect: X
1439
+ onSelect: U
1440
1440
  }, {
1441
1441
  default: o(() => [
1442
- (n(!0), v(N, null, Z(i(S), ($) => (n(), h(st, {
1443
- key: $.key,
1444
- node: $
1442
+ (n(!0), g(L, null, te(u(S), (w) => (n(), h(rt, {
1443
+ key: w.key,
1444
+ node: w
1445
1445
  }, null, 8, ["node"]))), 128))
1446
1446
  ]),
1447
1447
  _: 1
1448
1448
  }, 8, ["default-active", "collapse"])), [
1449
- [oe, i(B)]
1449
+ [ee, u(P)]
1450
1450
  ])
1451
1451
  ], 2),
1452
- p("main", Ul, [
1453
- i(R).length > 0 ? (n(), h(ue, {
1452
+ y("main", Xl, [
1453
+ u(A).length > 0 ? (n(), h(ue, {
1454
1454
  key: 0,
1455
- modelValue: i(b),
1456
- "onUpdate:modelValue": m[2] || (m[2] = ($) => Ce(b) ? b.value = $ : null),
1455
+ modelValue: u(b),
1456
+ "onUpdate:modelValue": v[2] || (v[2] = (w) => Se(b) ? b.value = w : null),
1457
1457
  type: "card",
1458
1458
  closable: "",
1459
1459
  class: "ys-main-panel__tabs",
1460
- onTabRemove: i(q)
1460
+ onTabRemove: u(N)
1461
1461
  }, {
1462
1462
  default: o(() => [
1463
- (n(!0), v(N, null, Z(i(R), ($) => (n(), h(E, {
1464
- key: $.key,
1465
- name: $.key
1463
+ (n(!0), g(L, null, te(u(A), (w) => (n(), h(E, {
1464
+ key: w.key,
1465
+ name: w.key
1466
1466
  }, {
1467
1467
  label: o(() => [
1468
- C(P($.label), 1)
1468
+ V(z(w.label), 1)
1469
1469
  ]),
1470
1470
  default: o(() => [
1471
- $.componentPath ? (n(), h(Te(i(T)($.componentPath)), Xe({
1471
+ w.componentPath ? (n(), h(Qe(u(T)(w.componentPath)), Ze({
1472
1472
  key: 0,
1473
1473
  ref_for: !0
1474
- }, $.props), null, 16)) : M("", !0)
1474
+ }, w.props), null, 16)) : R("", !0)
1475
1475
  ]),
1476
1476
  _: 2
1477
1477
  }, 1032, ["name"]))), 128))
1478
1478
  ]),
1479
1479
  _: 1
1480
- }, 8, ["modelValue", "onTabRemove"])) : (n(), v("div", Ll, [
1481
- c(ce, { description: "暂无打开的功能,从左侧菜单选择" })
1480
+ }, 8, ["modelValue", "onTabRemove"])) : (n(), g("div", Zl, [
1481
+ p(de, { description: "暂无打开的功能,从左侧菜单选择" })
1482
1482
  ]))
1483
1483
  ])
1484
1484
  ]);
1485
1485
  };
1486
1486
  }
1487
- }), Kl = /* @__PURE__ */ ae(Hl, [["__scopeId", "data-v-514e9964"]]), jl = {
1487
+ }), tn = /* @__PURE__ */ ae(en, [["__scopeId", "data-v-c36933e0"]]), ln = {
1488
1488
  key: 2,
1489
1489
  class: "yk-advanced-value-editor yk-advanced-value-editor--range"
1490
- }, Gl = {
1490
+ }, nn = {
1491
1491
  key: 4,
1492
1492
  class: "yk-advanced-value-editor yk-advanced-value-editor--daterange"
1493
- }, Wl = { class: "yk-advanced-value-editor__recent-pop" }, Jl = /* @__PURE__ */ ee({
1493
+ }, on = { class: "yk-advanced-value-editor__recent-pop" }, an = /* @__PURE__ */ Z({
1494
1494
  name: "YsAdvancedValueEditor",
1495
1495
  __name: "advancedValueEditor",
1496
1496
  props: {
@@ -1512,85 +1512,85 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
1512
1512
  valueFormat: { type: String, default: "YYYY-MM-DD" }
1513
1513
  },
1514
1514
  emits: ["update:modelValue"],
1515
- setup(e, { emit: f }) {
1516
- const t = e, l = f, a = Q(() => t.op === "between" || t.op === "not_between"), k = Q(() => t.op === "in" || t.op === "not_in"), u = Q({
1515
+ setup(e, { emit: m }) {
1516
+ const t = e, l = m, a = Q(() => t.op === "between" || t.op === "not_between"), k = Q(() => t.op === "in" || t.op === "not_in"), r = Q({
1517
1517
  get: () => typeof t.modelValue == "string" ? t.modelValue : "",
1518
- set: (r) => l("update:modelValue", r)
1519
- }), A = Q({
1518
+ set: (s) => l("update:modelValue", s)
1519
+ }), $ = Q({
1520
1520
  get: () => typeof t.modelValue == "number" ? t.modelValue : void 0,
1521
- set: (r) => l("update:modelValue", r ?? null)
1522
- }), y = Q({
1521
+ set: (s) => l("update:modelValue", s ?? null)
1522
+ }), f = Q({
1523
1523
  get: () => typeof t.modelValue == "string" ? t.modelValue : null,
1524
- set: (r) => l("update:modelValue", r)
1524
+ set: (s) => l("update:modelValue", s)
1525
1525
  }), x = Q({
1526
1526
  get: () => typeof t.modelValue == "boolean" ? t.modelValue : void 0,
1527
- set: (r) => l("update:modelValue", r ?? null)
1527
+ set: (s) => l("update:modelValue", s ?? null)
1528
1528
  }), S = Q({
1529
1529
  get: () => {
1530
- const r = t.modelValue;
1531
- if (typeof r == "string" || typeof r == "number" || typeof r == "boolean") return r;
1530
+ const s = t.modelValue;
1531
+ if (typeof s == "string" || typeof s == "number" || typeof s == "boolean") return s;
1532
1532
  },
1533
- set: (r) => l("update:modelValue", r ?? null)
1534
- }), B = Q({
1533
+ set: (s) => l("update:modelValue", s ?? null)
1534
+ }), P = Q({
1535
1535
  get: () => Array.isArray(t.modelValue) ? t.modelValue : [],
1536
- set: (r) => l("update:modelValue", r)
1537
- }), U = Q({
1536
+ set: (s) => l("update:modelValue", s)
1537
+ }), H = Q({
1538
1538
  get: () => {
1539
1539
  if (!Array.isArray(t.modelValue) || t.modelValue.length !== 2) return null;
1540
- const r = t.modelValue[0], m = t.modelValue[1];
1541
- return typeof r == "string" && typeof m == "string" ? [r, m] : null;
1540
+ const s = t.modelValue[0], v = t.modelValue[1];
1541
+ return typeof s == "string" && typeof v == "string" ? [s, v] : null;
1542
1542
  },
1543
- set: (r) => l("update:modelValue", r)
1544
- }), R = Q({
1543
+ set: (s) => l("update:modelValue", s)
1544
+ }), A = Q({
1545
1545
  get: () => {
1546
1546
  if (Array.isArray(t.modelValue)) {
1547
- const r = t.modelValue[0];
1548
- return typeof r == "number" ? r : void 0;
1547
+ const s = t.modelValue[0];
1548
+ return typeof s == "number" ? s : void 0;
1549
1549
  }
1550
1550
  },
1551
- set: (r) => {
1552
- const m = Array.isArray(t.modelValue) && typeof t.modelValue[1] == "number" ? t.modelValue[1] : null;
1553
- l("update:modelValue", [r ?? null, m]);
1551
+ set: (s) => {
1552
+ const v = Array.isArray(t.modelValue) && typeof t.modelValue[1] == "number" ? t.modelValue[1] : null;
1553
+ l("update:modelValue", [s ?? null, v]);
1554
1554
  }
1555
1555
  }), b = Q({
1556
1556
  get: () => {
1557
1557
  if (Array.isArray(t.modelValue)) {
1558
- const r = t.modelValue[1];
1559
- return typeof r == "number" ? r : void 0;
1558
+ const s = t.modelValue[1];
1559
+ return typeof s == "number" ? s : void 0;
1560
1560
  }
1561
1561
  },
1562
- set: (r) => {
1563
- const m = Array.isArray(t.modelValue) && typeof t.modelValue[0] == "number" ? t.modelValue[0] : null;
1564
- l("update:modelValue", [m, r ?? null]);
1562
+ set: (s) => {
1563
+ const v = Array.isArray(t.modelValue) && typeof t.modelValue[0] == "number" ? t.modelValue[0] : null;
1564
+ l("update:modelValue", [v, s ?? null]);
1565
1565
  }
1566
1566
  }), _ = [
1567
1567
  { label: "是", value: !0 },
1568
1568
  { label: "否", value: !1 }
1569
1569
  ];
1570
- function q(r) {
1571
- const m = /* @__PURE__ */ new Date(), F = /* @__PURE__ */ new Date();
1572
- return F.setDate(F.getDate() - r), [F, m];
1570
+ function N(s) {
1571
+ const v = /* @__PURE__ */ new Date(), F = /* @__PURE__ */ new Date();
1572
+ return F.setDate(F.getDate() - s), [F, v];
1573
1573
  }
1574
1574
  const T = [
1575
- { text: "最近 7 天", value: () => q(7) },
1576
- { text: "最近 30 天", value: () => q(30) },
1577
- { text: "最近 90 天", value: () => q(90) }
1578
- ], X = I(7);
1579
- function j() {
1580
- const r = X.value;
1581
- if (!r || r < 1) return;
1582
- const [m, F] = q(r);
1583
- U.value = [
1584
- at(m).format(t.valueFormat),
1585
- at(F).format(t.valueFormat)
1575
+ { text: "最近 7 天", value: () => N(7) },
1576
+ { text: "最近 30 天", value: () => N(30) },
1577
+ { text: "最近 90 天", value: () => N(90) }
1578
+ ], U = Y(7);
1579
+ function G() {
1580
+ const s = U.value;
1581
+ if (!s || s < 1) return;
1582
+ const [v, F] = N(s);
1583
+ H.value = [
1584
+ it(v).format(t.valueFormat),
1585
+ it(F).format(t.valueFormat)
1586
1586
  ];
1587
1587
  }
1588
- return (r, m) => {
1589
- const F = w("el-select"), Y = w("el-input"), E = w("el-input-number"), ue = w("el-date-picker"), ce = w("el-button"), oe = w("el-popover"), $ = w("el-option");
1588
+ return (s, v) => {
1589
+ const F = C("el-select"), q = C("el-input"), E = C("el-input-number"), ue = C("el-date-picker"), de = C("el-button"), ee = C("el-popover"), w = C("el-option");
1590
1590
  return e.fieldType === "string" && k.value ? (n(), h(F, {
1591
1591
  key: 0,
1592
- modelValue: B.value,
1593
- "onUpdate:modelValue": m[0] || (m[0] = (g) => B.value = g),
1592
+ modelValue: P.value,
1593
+ "onUpdate:modelValue": v[0] || (v[0] = (d) => P.value = d),
1594
1594
  class: "yk-advanced-value-editor",
1595
1595
  multiple: "",
1596
1596
  filterable: "",
@@ -1598,39 +1598,39 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
1598
1598
  "default-first-option": "",
1599
1599
  "reserve-keyword": !1,
1600
1600
  placeholder: "输入后回车添加"
1601
- }, null, 8, ["modelValue"])) : e.fieldType === "string" ? (n(), h(Y, {
1601
+ }, null, 8, ["modelValue"])) : e.fieldType === "string" ? (n(), h(q, {
1602
1602
  key: 1,
1603
- modelValue: u.value,
1604
- "onUpdate:modelValue": m[1] || (m[1] = (g) => u.value = g),
1603
+ modelValue: r.value,
1604
+ "onUpdate:modelValue": v[1] || (v[1] = (d) => r.value = d),
1605
1605
  placeholder: "请输入",
1606
1606
  clearable: ""
1607
- }, null, 8, ["modelValue"])) : e.fieldType === "number" && a.value ? (n(), v("div", jl, [
1608
- c(E, {
1609
- modelValue: R.value,
1610
- "onUpdate:modelValue": m[2] || (m[2] = (g) => R.value = g),
1607
+ }, null, 8, ["modelValue"])) : e.fieldType === "number" && a.value ? (n(), g("div", ln, [
1608
+ p(E, {
1609
+ modelValue: A.value,
1610
+ "onUpdate:modelValue": v[2] || (v[2] = (d) => A.value = d),
1611
1611
  placeholder: "最小值",
1612
1612
  controls: !1,
1613
1613
  class: "yk-advanced-value-editor__num"
1614
1614
  }, null, 8, ["modelValue"]),
1615
- m[11] || (m[11] = p("span", { class: "yk-advanced-value-editor__sep" }, "~", -1)),
1616
- c(E, {
1615
+ v[11] || (v[11] = y("span", { class: "yk-advanced-value-editor__sep" }, "~", -1)),
1616
+ p(E, {
1617
1617
  modelValue: b.value,
1618
- "onUpdate:modelValue": m[3] || (m[3] = (g) => b.value = g),
1618
+ "onUpdate:modelValue": v[3] || (v[3] = (d) => b.value = d),
1619
1619
  placeholder: "最大值",
1620
1620
  controls: !1,
1621
1621
  class: "yk-advanced-value-editor__num"
1622
1622
  }, null, 8, ["modelValue"])
1623
1623
  ])) : e.fieldType === "number" ? (n(), h(E, {
1624
1624
  key: 3,
1625
- modelValue: A.value,
1626
- "onUpdate:modelValue": m[4] || (m[4] = (g) => A.value = g),
1625
+ modelValue: $.value,
1626
+ "onUpdate:modelValue": v[4] || (v[4] = (d) => $.value = d),
1627
1627
  placeholder: "请输入数字",
1628
1628
  controls: !1,
1629
1629
  class: "yk-advanced-value-editor"
1630
- }, null, 8, ["modelValue"])) : e.fieldType === "date" && a.value ? (n(), v("div", Gl, [
1631
- c(ue, {
1632
- modelValue: U.value,
1633
- "onUpdate:modelValue": m[5] || (m[5] = (g) => U.value = g),
1630
+ }, null, 8, ["modelValue"])) : e.fieldType === "date" && a.value ? (n(), g("div", nn, [
1631
+ p(ue, {
1632
+ modelValue: H.value,
1633
+ "onUpdate:modelValue": v[5] || (v[5] = (d) => H.value = d),
1634
1634
  type: "daterange",
1635
1635
  "value-format": e.valueFormat,
1636
1636
  "start-placeholder": "开始日期",
@@ -1638,37 +1638,37 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
1638
1638
  shortcuts: T,
1639
1639
  class: "yk-advanced-value-editor__daterange-picker"
1640
1640
  }, null, 8, ["modelValue", "value-format"]),
1641
- c(oe, {
1641
+ p(ee, {
1642
1642
  trigger: "click",
1643
1643
  placement: "bottom",
1644
1644
  width: 240
1645
1645
  }, {
1646
1646
  reference: o(() => [
1647
- c(ce, { class: "yk-advanced-value-editor__recent-trigger" }, {
1648
- default: o(() => [...m[12] || (m[12] = [
1649
- C("最近 N 天", -1)
1647
+ p(de, { class: "yk-advanced-value-editor__recent-trigger" }, {
1648
+ default: o(() => [...v[12] || (v[12] = [
1649
+ V("最近 N 天", -1)
1650
1650
  ])]),
1651
1651
  _: 1
1652
1652
  })
1653
1653
  ]),
1654
1654
  default: o(() => [
1655
- p("div", Wl, [
1656
- m[14] || (m[14] = p("span", null, "最近", -1)),
1657
- c(E, {
1658
- modelValue: X.value,
1659
- "onUpdate:modelValue": m[6] || (m[6] = (g) => X.value = g),
1655
+ y("div", on, [
1656
+ v[14] || (v[14] = y("span", null, "最近", -1)),
1657
+ p(E, {
1658
+ modelValue: U.value,
1659
+ "onUpdate:modelValue": v[6] || (v[6] = (d) => U.value = d),
1660
1660
  min: 1,
1661
1661
  controls: !1,
1662
1662
  class: "yk-advanced-value-editor__recent-input"
1663
1663
  }, null, 8, ["modelValue"]),
1664
- m[15] || (m[15] = p("span", null, "天", -1)),
1665
- c(ce, {
1664
+ v[15] || (v[15] = y("span", null, "天", -1)),
1665
+ p(de, {
1666
1666
  type: "primary",
1667
1667
  size: "small",
1668
- onClick: j
1668
+ onClick: G
1669
1669
  }, {
1670
- default: o(() => [...m[13] || (m[13] = [
1671
- C("应用", -1)
1670
+ default: o(() => [...v[13] || (v[13] = [
1671
+ V("应用", -1)
1672
1672
  ])]),
1673
1673
  _: 1
1674
1674
  })
@@ -1678,8 +1678,8 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
1678
1678
  })
1679
1679
  ])) : e.fieldType === "date" ? (n(), h(ue, {
1680
1680
  key: 5,
1681
- modelValue: y.value,
1682
- "onUpdate:modelValue": m[7] || (m[7] = (g) => y.value = g),
1681
+ modelValue: f.value,
1682
+ "onUpdate:modelValue": v[7] || (v[7] = (d) => f.value = d),
1683
1683
  type: "date",
1684
1684
  "value-format": e.valueFormat,
1685
1685
  placeholder: "选择日期",
@@ -1687,64 +1687,64 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
1687
1687
  }, null, 8, ["modelValue", "value-format"])) : e.fieldType === "boolean" ? (n(), h(F, {
1688
1688
  key: 6,
1689
1689
  modelValue: x.value,
1690
- "onUpdate:modelValue": m[8] || (m[8] = (g) => x.value = g),
1690
+ "onUpdate:modelValue": v[8] || (v[8] = (d) => x.value = d),
1691
1691
  placeholder: "请选择",
1692
1692
  clearable: ""
1693
1693
  }, {
1694
1694
  default: o(() => [
1695
- (n(), v(N, null, Z(_, (g) => c($, {
1696
- key: String(g.value),
1697
- label: g.label,
1698
- value: g.value
1695
+ (n(), g(L, null, te(_, (d) => p(w, {
1696
+ key: String(d.value),
1697
+ label: d.label,
1698
+ value: d.value
1699
1699
  }, null, 8, ["label", "value"])), 64))
1700
1700
  ]),
1701
1701
  _: 1
1702
1702
  }, 8, ["modelValue"])) : e.fieldType === "enum" && k.value ? (n(), h(F, {
1703
1703
  key: 7,
1704
- modelValue: B.value,
1705
- "onUpdate:modelValue": m[9] || (m[9] = (g) => B.value = g),
1704
+ modelValue: P.value,
1705
+ "onUpdate:modelValue": v[9] || (v[9] = (d) => P.value = d),
1706
1706
  multiple: "",
1707
1707
  loading: e.optionsLoading,
1708
1708
  placeholder: "请选择",
1709
1709
  clearable: ""
1710
1710
  }, {
1711
1711
  default: o(() => [
1712
- (n(!0), v(N, null, Z(e.options, (g) => (n(), h($, {
1713
- key: String(g.value),
1714
- label: g.label,
1715
- value: g.value
1712
+ (n(!0), g(L, null, te(e.options, (d) => (n(), h(w, {
1713
+ key: String(d.value),
1714
+ label: d.label,
1715
+ value: d.value
1716
1716
  }, null, 8, ["label", "value"]))), 128))
1717
1717
  ]),
1718
1718
  _: 1
1719
1719
  }, 8, ["modelValue", "loading"])) : e.fieldType === "enum" ? (n(), h(F, {
1720
1720
  key: 8,
1721
1721
  modelValue: S.value,
1722
- "onUpdate:modelValue": m[10] || (m[10] = (g) => S.value = g),
1722
+ "onUpdate:modelValue": v[10] || (v[10] = (d) => S.value = d),
1723
1723
  loading: e.optionsLoading,
1724
1724
  placeholder: "请选择",
1725
1725
  clearable: ""
1726
1726
  }, {
1727
1727
  default: o(() => [
1728
- (n(!0), v(N, null, Z(e.options, (g) => (n(), h($, {
1729
- key: String(g.value),
1730
- label: g.label,
1731
- value: g.value
1728
+ (n(!0), g(L, null, te(e.options, (d) => (n(), h(w, {
1729
+ key: String(d.value),
1730
+ label: d.label,
1731
+ value: d.value
1732
1732
  }, null, 8, ["label", "value"]))), 128))
1733
1733
  ]),
1734
1734
  _: 1
1735
- }, 8, ["modelValue", "loading"])) : M("", !0);
1735
+ }, 8, ["modelValue", "loading"])) : R("", !0);
1736
1736
  };
1737
1737
  }
1738
- }), _t = /* @__PURE__ */ ae(Jl, [["__scopeId", "data-v-dda18bcf"]]), bt = Symbol("YsAdvancedFilter"), Xl = { class: "yk-adv-group__header" }, Zl = { class: "yk-adv-group__actions" }, en = { class: "yk-adv-group__children" }, tn = {
1738
+ }), wt = /* @__PURE__ */ ae(an, [["__scopeId", "data-v-dda18bcf"]]), xt = Symbol("YsAdvancedFilter"), sn = { class: "yk-adv-group__header" }, rn = { class: "yk-adv-group__actions" }, un = { class: "yk-adv-group__children" }, dn = {
1739
1739
  key: 0,
1740
1740
  class: "yk-adv-group__nested"
1741
- }, ln = {
1741
+ }, cn = {
1742
1742
  key: 1,
1743
1743
  class: "yk-adv-group__row"
1744
- }, nn = {
1744
+ }, pn = {
1745
1745
  key: 0,
1746
1746
  class: "yk-adv-group__empty"
1747
- }, on = /* @__PURE__ */ ee({
1747
+ }, mn = /* @__PURE__ */ Z({
1748
1748
  name: "YsAdvancedConditionGroup",
1749
1749
  __name: "advancedConditionGroup",
1750
1750
  props: {
@@ -1754,180 +1754,180 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
1754
1754
  level: { type: Number, default: 0 }
1755
1755
  },
1756
1756
  setup(e) {
1757
- const f = e, t = dt(bt);
1757
+ const m = e, t = mt(xt);
1758
1758
  function l(b) {
1759
- (b === "and" || b === "or") && t.api.setGroupCombinator(f.group.id, b);
1759
+ (b === "and" || b === "or") && t.api.setGroupCombinator(m.group.id, b);
1760
1760
  }
1761
1761
  function a() {
1762
- t.api.addLeaf(f.group.id);
1762
+ t.api.addLeaf(m.group.id);
1763
1763
  }
1764
1764
  function k() {
1765
- t.api.addNestedGroup(f.group.id);
1765
+ t.api.addNestedGroup(m.group.id);
1766
1766
  }
1767
- function u() {
1768
- t.api.removeNode(f.group.id);
1767
+ function r() {
1768
+ t.api.removeNode(m.group.id);
1769
1769
  }
1770
- function A(b, _) {
1770
+ function $(b, _) {
1771
1771
  typeof _ == "string" && t.api.changeField(b.id, _);
1772
1772
  }
1773
- function y(b, _) {
1773
+ function f(b, _) {
1774
1774
  t.api.changeOperator(b.id, _);
1775
1775
  }
1776
1776
  function x(b) {
1777
1777
  t.api.removeNode(b);
1778
1778
  }
1779
- const S = et;
1780
- function B(b) {
1779
+ const S = tt;
1780
+ function P(b) {
1781
1781
  return b;
1782
1782
  }
1783
- function U(b) {
1783
+ function H(b) {
1784
1784
  return t.columns.find((_) => _.propertyPath === b);
1785
1785
  }
1786
- function R(b) {
1786
+ function A(b) {
1787
1787
  var _;
1788
- return ((_ = U(b)) == null ? void 0 : _.displayFormat) ?? "YYYY-MM-DD";
1788
+ return ((_ = H(b)) == null ? void 0 : _.displayFormat) ?? "YYYY-MM-DD";
1789
1789
  }
1790
1790
  return (b, _) => {
1791
- const q = w("el-radio-button"), T = w("el-radio-group"), X = w("el-button"), j = w("YsAdvancedConditionGroup"), r = w("el-option"), m = w("el-select");
1792
- return n(), v("div", {
1793
- class: Se(["yk-adv-group", [`level-${e.level}`, { "is-root": e.level === 0 }]])
1791
+ const N = C("el-radio-button"), T = C("el-radio-group"), U = C("el-button"), G = C("YsAdvancedConditionGroup"), s = C("el-option"), v = C("el-select");
1792
+ return n(), g("div", {
1793
+ class: $e(["yk-adv-group", [`level-${e.level}`, { "is-root": e.level === 0 }]])
1794
1794
  }, [
1795
- p("div", Xl, [
1796
- _[5] || (_[5] = p("span", { class: "yk-adv-group__comb-label" }, "满足", -1)),
1797
- c(T, {
1795
+ y("div", sn, [
1796
+ _[5] || (_[5] = y("span", { class: "yk-adv-group__comb-label" }, "满足", -1)),
1797
+ p(T, {
1798
1798
  "model-value": e.group.combinator,
1799
1799
  size: "small",
1800
1800
  "onUpdate:modelValue": l
1801
1801
  }, {
1802
1802
  default: o(() => [
1803
- c(q, { value: "and" }, {
1803
+ p(N, { value: "and" }, {
1804
1804
  default: o(() => [..._[0] || (_[0] = [
1805
- C("全部", -1)
1805
+ V("全部", -1)
1806
1806
  ])]),
1807
1807
  _: 1
1808
1808
  }),
1809
- c(q, { value: "or" }, {
1809
+ p(N, { value: "or" }, {
1810
1810
  default: o(() => [..._[1] || (_[1] = [
1811
- C("任一", -1)
1811
+ V("任一", -1)
1812
1812
  ])]),
1813
1813
  _: 1
1814
1814
  })
1815
1815
  ]),
1816
1816
  _: 1
1817
1817
  }, 8, ["model-value"]),
1818
- _[6] || (_[6] = p("span", { class: "yk-adv-group__comb-label" }, "条件", -1)),
1819
- p("span", Zl, [
1820
- c(X, {
1818
+ _[6] || (_[6] = y("span", { class: "yk-adv-group__comb-label" }, "条件", -1)),
1819
+ y("span", rn, [
1820
+ p(U, {
1821
1821
  link: "",
1822
1822
  type: "primary",
1823
1823
  onClick: a
1824
1824
  }, {
1825
1825
  default: o(() => [..._[2] || (_[2] = [
1826
- C("+ 条件", -1)
1826
+ V("+ 条件", -1)
1827
1827
  ])]),
1828
1828
  _: 1
1829
1829
  }),
1830
- c(X, {
1830
+ p(U, {
1831
1831
  link: "",
1832
1832
  type: "primary",
1833
1833
  onClick: k
1834
1834
  }, {
1835
1835
  default: o(() => [..._[3] || (_[3] = [
1836
- C(" + 嵌套组 ", -1)
1836
+ V(" + 嵌套组 ", -1)
1837
1837
  ])]),
1838
1838
  _: 1
1839
1839
  }),
1840
- e.level > 0 ? (n(), h(X, {
1840
+ e.level > 0 ? (n(), h(U, {
1841
1841
  key: 0,
1842
1842
  link: "",
1843
1843
  type: "danger",
1844
- onClick: u
1844
+ onClick: r
1845
1845
  }, {
1846
1846
  default: o(() => [..._[4] || (_[4] = [
1847
- C(" 删除组 ", -1)
1847
+ V(" 删除组 ", -1)
1848
1848
  ])]),
1849
1849
  _: 1
1850
- })) : M("", !0)
1850
+ })) : R("", !0)
1851
1851
  ])
1852
1852
  ]),
1853
- p("div", en, [
1854
- (n(!0), v(N, null, Z(e.group.children, (F) => (n(), v(N, {
1853
+ y("div", un, [
1854
+ (n(!0), g(L, null, te(e.group.children, (F) => (n(), g(L, {
1855
1855
  key: F.id
1856
1856
  }, [
1857
- i(S)(F) ? (n(), v("div", tn, [
1858
- c(j, {
1857
+ u(S)(F) ? (n(), g("div", dn, [
1858
+ p(G, {
1859
1859
  group: F,
1860
1860
  level: e.level + 1
1861
1861
  }, null, 8, ["group", "level"])
1862
- ])) : (n(), v("div", ln, [
1863
- c(m, {
1862
+ ])) : (n(), g("div", cn, [
1863
+ p(v, {
1864
1864
  "model-value": F.propertyPath,
1865
1865
  class: "yk-adv-group__field",
1866
1866
  placeholder: "选择字段",
1867
1867
  filterable: "",
1868
- "onUpdate:modelValue": (Y) => A(F, Y)
1868
+ "onUpdate:modelValue": (q) => $(F, q)
1869
1869
  }, {
1870
1870
  default: o(() => [
1871
- (n(!0), v(N, null, Z(i(t).columns, (Y) => (n(), h(r, {
1872
- key: Y.propertyPath,
1873
- label: Y.displayName ?? Y.propertyPath,
1874
- value: Y.propertyPath
1871
+ (n(!0), g(L, null, te(u(t).columns, (q) => (n(), h(s, {
1872
+ key: q.propertyPath,
1873
+ label: q.displayName ?? q.propertyPath,
1874
+ value: q.propertyPath
1875
1875
  }, null, 8, ["label", "value"]))), 128))
1876
1876
  ]),
1877
1877
  _: 1
1878
1878
  }, 8, ["model-value", "onUpdate:modelValue"]),
1879
- c(m, {
1879
+ p(v, {
1880
1880
  "model-value": F.op,
1881
1881
  class: "yk-adv-group__op",
1882
1882
  placeholder: "操作符",
1883
1883
  filterable: "",
1884
- "onUpdate:modelValue": (Y) => y(F, Y)
1884
+ "onUpdate:modelValue": (q) => f(F, q)
1885
1885
  }, {
1886
1886
  default: o(() => [
1887
- (n(!0), v(N, null, Z(i(t).api.operatorsOf(F.propertyPath), (Y) => (n(), h(r, {
1888
- key: Y,
1889
- label: i(Lt)[Y],
1890
- value: Y
1887
+ (n(!0), g(L, null, te(u(t).api.operatorsOf(F.propertyPath), (q) => (n(), h(s, {
1888
+ key: q,
1889
+ label: u(Zt)[q],
1890
+ value: q
1891
1891
  }, null, 8, ["label", "value"]))), 128))
1892
1892
  ]),
1893
1893
  _: 2
1894
1894
  }, 1032, ["model-value", "onUpdate:modelValue"]),
1895
- i(Ht)(F.op) ? M("", !0) : (n(), h(_t, {
1895
+ u(el)(F.op) ? R("", !0) : (n(), h(wt, {
1896
1896
  key: 0,
1897
- "field-type": i(t).api.fieldTypeOf(F.propertyPath),
1897
+ "field-type": u(t).api.fieldTypeOf(F.propertyPath),
1898
1898
  op: F.op,
1899
- options: i(t).optionsMap.value[F.propertyPath] ?? [],
1900
- "options-loading": i(t).loadingMap.value[F.propertyPath] === !0,
1901
- "value-format": R(F.propertyPath),
1902
- class: Se([
1899
+ options: u(t).optionsMap.value[F.propertyPath] ?? [],
1900
+ "options-loading": u(t).loadingMap.value[F.propertyPath] === !0,
1901
+ "value-format": A(F.propertyPath),
1902
+ class: $e([
1903
1903
  "yk-adv-group__value",
1904
- { "is-invalid": i(t).api.isConditionEmpty(F) }
1904
+ { "is-invalid": u(t).api.isConditionEmpty(F) }
1905
1905
  ]),
1906
1906
  modelValue: F.value,
1907
- "onUpdate:modelValue": (Y) => F.value = Y
1907
+ "onUpdate:modelValue": (q) => F.value = q
1908
1908
  }, null, 8, ["field-type", "op", "options", "options-loading", "value-format", "class", "modelValue", "onUpdate:modelValue"])),
1909
- c(X, {
1909
+ p(U, {
1910
1910
  link: "",
1911
1911
  type: "danger",
1912
1912
  class: "yk-adv-group__remove",
1913
- onClick: (Y) => x(F.id)
1913
+ onClick: (q) => x(F.id)
1914
1914
  }, {
1915
1915
  default: o(() => [..._[7] || (_[7] = [
1916
- C(" 删除 ", -1)
1916
+ V(" 删除 ", -1)
1917
1917
  ])]),
1918
1918
  _: 1
1919
1919
  }, 8, ["onClick"])
1920
1920
  ]))
1921
1921
  ], 64))), 128)),
1922
- e.group.children.length === 0 ? (n(), v("div", nn, " 暂无条件,点击「+ 条件」或「+ 嵌套组」 ")) : M("", !0)
1922
+ e.group.children.length === 0 ? (n(), g("div", pn, " 暂无条件,点击「+ 条件」或「+ 嵌套组」 ")) : R("", !0)
1923
1923
  ])
1924
1924
  ], 2);
1925
1925
  };
1926
1926
  }
1927
- }), ht = /* @__PURE__ */ ae(on, [["__scopeId", "data-v-518d9c97"]]), an = {
1927
+ }), Ct = /* @__PURE__ */ ae(mn, [["__scopeId", "data-v-518d9c97"]]), fn = {
1928
1928
  key: 0,
1929
1929
  class: "yk-advanced-filter__actions"
1930
- }, sn = /* @__PURE__ */ ee({
1930
+ }, vn = /* @__PURE__ */ Z({
1931
1931
  name: "YsAdvancedFilterPanel",
1932
1932
  __name: "advancedFilterPanel",
1933
1933
  props: {
@@ -1955,181 +1955,181 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
1955
1955
  }
1956
1956
  },
1957
1957
  emits: ["search", "reset", "update:savedQueries"],
1958
- setup(e, { expose: f, emit: t }) {
1959
- const l = e, a = t, k = mt(l), { rootGroup: u, fieldTypeOf: A, filter: y, reset: x } = k, S = I({}), B = I({});
1960
- async function U($) {
1961
- var G;
1962
- const g = (G = l.optionSources) == null ? void 0 : G[$];
1963
- if (g && !(S.value[$] || B.value[$])) {
1964
- B.value[$] = !0;
1958
+ setup(e, { expose: m, emit: t }) {
1959
+ const l = e, a = t, k = yt(l), { rootGroup: r, fieldTypeOf: $, filter: f, reset: x } = k, S = Y({}), P = Y({});
1960
+ async function H(w) {
1961
+ var j;
1962
+ const d = (j = l.optionSources) == null ? void 0 : j[w];
1963
+ if (d && !(S.value[w] || P.value[w])) {
1964
+ P.value[w] = !0;
1965
1965
  try {
1966
- S.value[$] = await g();
1966
+ S.value[w] = await d();
1967
1967
  } finally {
1968
- B.value[$] = !1;
1968
+ P.value[w] = !1;
1969
1969
  }
1970
1970
  }
1971
1971
  }
1972
- function R($) {
1973
- const g = /* @__PURE__ */ new Set();
1974
- function G(de) {
1975
- et(de) ? de.children.forEach(G) : A(de.propertyPath) === "enum" && g.add(de.propertyPath);
1972
+ function A(w) {
1973
+ const d = /* @__PURE__ */ new Set();
1974
+ function j(se) {
1975
+ tt(se) ? se.children.forEach(j) : $(se.propertyPath) === "enum" && d.add(se.propertyPath);
1976
1976
  }
1977
- return $.children.forEach(G), [...g];
1977
+ return w.children.forEach(j), [...d];
1978
1978
  }
1979
1979
  me(
1980
- u,
1981
- ($) => {
1982
- for (const g of R($))
1983
- U(g);
1980
+ r,
1981
+ (w) => {
1982
+ for (const d of A(w))
1983
+ H(d);
1984
1984
  },
1985
1985
  { deep: !0, immediate: !0 }
1986
- ), ct(bt, {
1986
+ ), ft(xt, {
1987
1987
  columns: l.columns,
1988
1988
  optionsMap: S,
1989
- loadingMap: B,
1989
+ loadingMap: P,
1990
1990
  api: k
1991
1991
  });
1992
1992
  function b() {
1993
- a("search", y.value);
1993
+ a("search", f.value);
1994
1994
  }
1995
1995
  function _() {
1996
1996
  x(), a("reset");
1997
1997
  }
1998
- const q = I([]), T = Q(
1999
- () => l.savedQueries ?? q.value
1998
+ const N = Y([]), T = Q(
1999
+ () => l.savedQueries ?? N.value
2000
2000
  );
2001
- function X($) {
2002
- q.value = $, a("update:savedQueries", $);
2001
+ function U(w) {
2002
+ N.value = w, a("update:savedQueries", w);
2003
2003
  }
2004
- const j = I(!1), r = I(""), m = I("");
2004
+ const G = Y(!1), s = Y(""), v = Y("");
2005
2005
  let F = 0;
2006
- function Y() {
2007
- function $(g) {
2008
- return g.children.some((G) => et(G) ? $(G) : k.isConditionEmpty(G));
2006
+ function q() {
2007
+ function w(d) {
2008
+ return d.children.some((j) => tt(j) ? w(j) : k.isConditionEmpty(j));
2009
2009
  }
2010
- return $(u.value);
2010
+ return w(r.value);
2011
2011
  }
2012
2012
  function E() {
2013
- r.value = "", m.value = "", j.value = !0;
2013
+ s.value = "", v.value = "", G.value = !0;
2014
2014
  }
2015
2015
  function ue() {
2016
- const $ = r.value.trim();
2017
- if (!$) return;
2018
- Y() && fe.warning("当前存在未填值的条件行(标红),保存的预设可能不完整");
2019
- const g = JSON.parse(JSON.stringify(u.value)), G = {
2016
+ const w = s.value.trim();
2017
+ if (!w) return;
2018
+ q() && fe.warning("当前存在未填值的条件行(标红),保存的预设可能不完整");
2019
+ const d = JSON.parse(JSON.stringify(r.value)), j = {
2020
2020
  id: `sq-${++F}`,
2021
- name: $,
2022
- description: m.value.trim(),
2023
- group: g,
2024
- filterInfo: y.value
2021
+ name: w,
2022
+ description: v.value.trim(),
2023
+ group: d,
2024
+ filterInfo: f.value
2025
2025
  };
2026
- X([...T.value, G]), j.value = !1;
2026
+ U([...T.value, j]), G.value = !1;
2027
2027
  }
2028
- function ce($) {
2029
- u.value = JSON.parse(JSON.stringify($.group)), b();
2028
+ function de(w) {
2029
+ r.value = JSON.parse(JSON.stringify(w.group)), b();
2030
2030
  }
2031
- function oe($) {
2032
- X(T.value.filter((g) => g.id !== $));
2031
+ function ee(w) {
2032
+ U(T.value.filter((d) => d.id !== w));
2033
2033
  }
2034
- return f({
2034
+ return m({
2035
2035
  get filter() {
2036
- return y.value;
2036
+ return f.value;
2037
2037
  },
2038
2038
  reset: _,
2039
2039
  openSaveDialog: E,
2040
- applySavedQuery: ce,
2041
- removeSavedQuery: oe,
2040
+ applySavedQuery: de,
2041
+ removeSavedQuery: ee,
2042
2042
  get savedQueries() {
2043
2043
  return T.value;
2044
2044
  }
2045
- }), ($, g) => {
2046
- const G = w("el-button"), de = w("el-input"), D = w("el-form-item"), z = w("el-form"), H = w("el-dialog");
2047
- return n(), v("div", {
2045
+ }), (w, d) => {
2046
+ const j = C("el-button"), se = C("el-input"), D = C("el-form-item"), I = C("el-form"), B = C("el-dialog");
2047
+ return n(), g("div", {
2048
2048
  class: "yk-advanced-filter",
2049
- onKeydown: Ke(b, ["enter"])
2049
+ onKeydown: je(b, ["enter"])
2050
2050
  }, [
2051
- c(ht, {
2052
- group: i(u),
2051
+ p(Ct, {
2052
+ group: u(r),
2053
2053
  level: 0
2054
2054
  }, null, 8, ["group"]),
2055
- e.showSearch || e.showReset || e.showSaveQuery ? (n(), v("div", an, [
2056
- e.showSearch ? (n(), h(G, {
2055
+ e.showSearch || e.showReset || e.showSaveQuery ? (n(), g("div", fn, [
2056
+ e.showSearch ? (n(), h(j, {
2057
2057
  key: 0,
2058
2058
  type: "primary",
2059
2059
  onClick: b
2060
2060
  }, {
2061
2061
  default: o(() => [
2062
- C(P(e.searchButtonText), 1)
2062
+ V(z(e.searchButtonText), 1)
2063
2063
  ]),
2064
2064
  _: 1
2065
- })) : M("", !0),
2066
- e.showReset ? (n(), h(G, {
2065
+ })) : R("", !0),
2066
+ e.showReset ? (n(), h(j, {
2067
2067
  key: 1,
2068
2068
  onClick: _
2069
2069
  }, {
2070
2070
  default: o(() => [
2071
- C(P(e.resetButtonText), 1)
2071
+ V(z(e.resetButtonText), 1)
2072
2072
  ]),
2073
2073
  _: 1
2074
- })) : M("", !0),
2075
- e.showSaveQuery ? (n(), h(G, {
2074
+ })) : R("", !0),
2075
+ e.showSaveQuery ? (n(), h(j, {
2076
2076
  key: 2,
2077
2077
  onClick: E
2078
2078
  }, {
2079
- default: o(() => [...g[4] || (g[4] = [
2080
- C("保存", -1)
2079
+ default: o(() => [...d[4] || (d[4] = [
2080
+ V("保存", -1)
2081
2081
  ])]),
2082
2082
  _: 1
2083
- })) : M("", !0)
2084
- ])) : M("", !0),
2085
- c(H, {
2086
- modelValue: j.value,
2087
- "onUpdate:modelValue": g[3] || (g[3] = (L) => j.value = L),
2083
+ })) : R("", !0)
2084
+ ])) : R("", !0),
2085
+ p(B, {
2086
+ modelValue: G.value,
2087
+ "onUpdate:modelValue": d[3] || (d[3] = (O) => G.value = O),
2088
2088
  title: "保存查询",
2089
2089
  width: "440px",
2090
2090
  "append-to-body": ""
2091
2091
  }, {
2092
2092
  footer: o(() => [
2093
- c(G, {
2094
- onClick: g[2] || (g[2] = (L) => j.value = !1)
2093
+ p(j, {
2094
+ onClick: d[2] || (d[2] = (O) => G.value = !1)
2095
2095
  }, {
2096
- default: o(() => [...g[5] || (g[5] = [
2097
- C("取消", -1)
2096
+ default: o(() => [...d[5] || (d[5] = [
2097
+ V("取消", -1)
2098
2098
  ])]),
2099
2099
  _: 1
2100
2100
  }),
2101
- c(G, {
2101
+ p(j, {
2102
2102
  type: "primary",
2103
- disabled: !r.value.trim(),
2103
+ disabled: !s.value.trim(),
2104
2104
  onClick: ue
2105
2105
  }, {
2106
- default: o(() => [...g[6] || (g[6] = [
2107
- C(" 确定 ", -1)
2106
+ default: o(() => [...d[6] || (d[6] = [
2107
+ V(" 确定 ", -1)
2108
2108
  ])]),
2109
2109
  _: 1
2110
2110
  }, 8, ["disabled"])
2111
2111
  ]),
2112
2112
  default: o(() => [
2113
- c(z, { "label-position": "top" }, {
2113
+ p(I, { "label-position": "top" }, {
2114
2114
  default: o(() => [
2115
- c(D, { label: "名称" }, {
2115
+ p(D, { label: "名称" }, {
2116
2116
  default: o(() => [
2117
- c(de, {
2118
- modelValue: r.value,
2119
- "onUpdate:modelValue": g[0] || (g[0] = (L) => r.value = L),
2117
+ p(se, {
2118
+ modelValue: s.value,
2119
+ "onUpdate:modelValue": d[0] || (d[0] = (O) => s.value = O),
2120
2120
  placeholder: "请输入查询名称",
2121
2121
  maxlength: "50",
2122
2122
  "show-word-limit": "",
2123
- onKeydown: Ke(ue, ["enter"])
2123
+ onKeydown: je(ue, ["enter"])
2124
2124
  }, null, 8, ["modelValue"])
2125
2125
  ]),
2126
2126
  _: 1
2127
2127
  }),
2128
- c(D, { label: "描述" }, {
2128
+ p(D, { label: "描述" }, {
2129
2129
  default: o(() => [
2130
- c(de, {
2131
- modelValue: m.value,
2132
- "onUpdate:modelValue": g[1] || (g[1] = (L) => m.value = L),
2130
+ p(se, {
2131
+ modelValue: v.value,
2132
+ "onUpdate:modelValue": d[1] || (d[1] = (O) => v.value = O),
2133
2133
  type: "textarea",
2134
2134
  rows: 2,
2135
2135
  placeholder: "可选,描述此查询的用途(hover 标签时显示)",
@@ -2148,7 +2148,7 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
2148
2148
  ], 32);
2149
2149
  };
2150
2150
  }
2151
- }), wt = /* @__PURE__ */ ae(sn, [["__scopeId", "data-v-0563cef9"]]), rn = {
2151
+ }), St = /* @__PURE__ */ ae(vn, [["__scopeId", "data-v-0563cef9"]]), yn = {
2152
2152
  key: 0,
2153
2153
  viewBox: "0 0 24 24",
2154
2154
  width: "16",
@@ -2158,7 +2158,7 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
2158
2158
  "stroke-width": "2",
2159
2159
  "stroke-linecap": "round",
2160
2160
  "stroke-linejoin": "round"
2161
- }, un = {
2161
+ }, gn = {
2162
2162
  key: 1,
2163
2163
  viewBox: "0 0 24 24",
2164
2164
  width: "16",
@@ -2168,16 +2168,16 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
2168
2168
  "stroke-width": "2",
2169
2169
  "stroke-linecap": "round",
2170
2170
  "stroke-linejoin": "round"
2171
- }, dn = {
2171
+ }, kn = {
2172
2172
  key: 1,
2173
2173
  class: "yk-filter-panel__actions"
2174
- }, cn = {
2174
+ }, _n = {
2175
2175
  key: 2,
2176
2176
  class: "yk-filter-panel__saved"
2177
- }, pn = { class: "yk-filter-panel__mode-bar" }, mn = {
2177
+ }, bn = { class: "yk-filter-panel__mode-bar" }, hn = {
2178
2178
  key: 0,
2179
2179
  class: "yk-filter-panel__saved"
2180
- }, fn = /* @__PURE__ */ ee({
2180
+ }, wn = /* @__PURE__ */ Z({
2181
2181
  name: "YsFilterPanel",
2182
2182
  __name: "filterPanel",
2183
2183
  props: {
@@ -2234,270 +2234,270 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
2234
2234
  singleLine: { type: Boolean, default: !1 }
2235
2235
  },
2236
2236
  emits: ["search", "reset", "update:quickQueries"],
2237
- setup(e, { expose: f, emit: t }) {
2238
- const l = e, a = t, { filter: k, register: u, reset: A } = It();
2239
- ct(ft, u);
2240
- const y = I("simple"), x = I(!0), S = I(0), B = I(null), U = I([]), R = Q(
2241
- () => l.quickQueries ?? U.value
2242
- ), b = I(null), _ = Q(() => {
2237
+ setup(e, { expose: m, emit: t }) {
2238
+ const l = e, a = t, { filter: k, register: r, reset: $ } = Ot();
2239
+ ft(gt, r);
2240
+ const f = Y("simple"), x = Y(!0), S = Y(0), P = Y(null), H = Y([]), A = Q(
2241
+ () => l.quickQueries ?? H.value
2242
+ ), b = Y(null), _ = Q(() => {
2243
2243
  var D;
2244
- return y.value === "advanced" ? ((D = b.value) == null ? void 0 : D.filter) ?? tt() : k.value;
2244
+ return f.value === "advanced" ? ((D = b.value) == null ? void 0 : D.filter) ?? lt() : k.value;
2245
2245
  });
2246
- function q() {
2246
+ function N() {
2247
2247
  a("search", _.value);
2248
2248
  }
2249
2249
  function T() {
2250
2250
  var D;
2251
- y.value === "advanced" ? (D = b.value) == null || D.reset() : A(), a("reset");
2251
+ f.value === "advanced" ? (D = b.value) == null || D.reset() : $(), a("reset");
2252
2252
  }
2253
- function X(D) {
2253
+ function U(D) {
2254
2254
  a("search", D);
2255
2255
  }
2256
- function j() {
2256
+ function G() {
2257
2257
  a("reset");
2258
2258
  }
2259
- async function r(D) {
2260
- const z = new Set(R.value.map((L) => L.id)), H = D.filter((L) => !z.has(L.id));
2261
- if (l.saveQuickQueryFun && H.length > 0) {
2262
- const L = [];
2263
- for (const K of H)
2259
+ async function s(D) {
2260
+ const I = new Set(A.value.map((O) => O.id)), B = D.filter((O) => !I.has(O.id));
2261
+ if (l.saveQuickQueryFun && B.length > 0) {
2262
+ const O = [];
2263
+ for (const W of B)
2264
2264
  try {
2265
- const ne = await l.saveQuickQueryFun(K);
2266
- L.push(ne ?? K);
2265
+ const oe = await l.saveQuickQueryFun(W);
2266
+ O.push(oe ?? W);
2267
2267
  } catch {
2268
- fe.error(`保存快速查询「${K.name}」失败`), L.push(K);
2268
+ fe.error(`保存快速查询「${W.name}」失败`), O.push(W);
2269
2269
  }
2270
- let se = D;
2271
- if (L.some((K, ne) => K !== H[ne])) {
2272
- const K = new Map(H.map((ne, ge) => [ne.id, L[ge] ?? ne]));
2273
- se = D.map((ne) => K.get(ne.id) ?? ne);
2270
+ let ie = D;
2271
+ if (O.some((W, oe) => W !== B[oe])) {
2272
+ const W = new Map(B.map((oe, ke) => [oe.id, O[ke] ?? oe]));
2273
+ ie = D.map((oe) => W.get(oe.id) ?? oe);
2274
2274
  }
2275
- U.value = se, a("update:quickQueries", se);
2275
+ H.value = ie, a("update:quickQueries", ie);
2276
2276
  } else
2277
- U.value = D, a("update:quickQueries", D);
2277
+ H.value = D, a("update:quickQueries", D);
2278
2278
  }
2279
- let m = null;
2279
+ let v = null;
2280
2280
  function F() {
2281
- return !m && l.advancedColumns.length && (m = mt({
2281
+ return !v && l.advancedColumns.length && (v = yt({
2282
2282
  columns: l.advancedColumns,
2283
2283
  optionSources: l.advancedOptionSources
2284
- })), m;
2284
+ })), v;
2285
2285
  }
2286
- function Y(D) {
2287
- const z = F();
2288
- return z ? (z.rootGroup.value = JSON.parse(JSON.stringify(D)), z.filter.value) : { toString: () => "", isEmpty: () => !0 };
2286
+ function q(D) {
2287
+ const I = F();
2288
+ return I ? (I.rootGroup.value = JSON.parse(JSON.stringify(D)), I.filter.value) : { toString: () => "", isEmpty: () => !0 };
2289
2289
  }
2290
- Fe(async () => {
2290
+ Me(async () => {
2291
2291
  if (l.loadQuickQueryFun)
2292
2292
  try {
2293
- const z = (await l.loadQuickQueryFun()).map((H) => ({
2294
- ...H,
2295
- filterInfo: H.filterInfo ?? Y(H.group)
2293
+ const I = (await l.loadQuickQueryFun()).map((B) => ({
2294
+ ...B,
2295
+ filterInfo: B.filterInfo ?? q(B.group)
2296
2296
  }));
2297
- U.value = z, a("update:quickQueries", z);
2297
+ H.value = I, a("update:quickQueries", I);
2298
2298
  } catch {
2299
2299
  fe.error("加载快速查询失败");
2300
2300
  }
2301
2301
  });
2302
2302
  function E() {
2303
- y.value !== "advanced" && q();
2303
+ f.value !== "advanced" && N();
2304
2304
  }
2305
2305
  function ue() {
2306
- y.value = "advanced";
2306
+ f.value = "advanced";
2307
2307
  }
2308
- function ce() {
2309
- y.value = "simple";
2308
+ function de() {
2309
+ f.value = "simple";
2310
2310
  }
2311
- function oe() {
2311
+ function ee() {
2312
2312
  x.value = !x.value;
2313
2313
  }
2314
- function $() {
2315
- const D = B.value;
2314
+ function w() {
2315
+ const D = P.value;
2316
2316
  if (!D) return;
2317
- for (const ge of Array.from(D.children))
2318
- ge.style.display = "";
2317
+ for (const ke of Array.from(D.children))
2318
+ ke.style.display = "";
2319
2319
  if (!l.singleLine || !x.value) {
2320
2320
  S.value = 0, D.style.maxWidth = "";
2321
2321
  return;
2322
2322
  }
2323
- const z = D.nextElementSibling, H = z ? z.offsetWidth : 0, L = 16;
2324
- D.style.maxWidth = `calc(100% - ${H + L}px)`;
2325
- const se = D.clientWidth;
2326
- let K = 0, ne = 0;
2327
- for (const ge of Array.from(D.children)) {
2328
- const xe = ge, pe = xe.offsetWidth;
2329
- K > 0 && K + pe + L > se ? (xe.style.display = "none", ne++) : K += pe + L;
2323
+ const I = D.nextElementSibling, B = I ? I.offsetWidth : 0, O = 16;
2324
+ D.style.maxWidth = `calc(100% - ${B + O}px)`;
2325
+ const ie = D.clientWidth;
2326
+ let W = 0, oe = 0;
2327
+ for (const ke of Array.from(D.children)) {
2328
+ const Ce = ke, pe = Ce.offsetWidth;
2329
+ W > 0 && W + pe + O > ie ? (Ce.style.display = "none", oe++) : W += pe + O;
2330
2330
  }
2331
- S.value = ne;
2331
+ S.value = oe;
2332
2332
  }
2333
- let g = null;
2334
- function G(D) {
2335
- var z;
2336
- y.value === "advanced" ? (z = b.value) == null || z.applySavedQuery(D) : a("search", D.filterInfo);
2333
+ let d = null;
2334
+ function j(D) {
2335
+ var I;
2336
+ f.value === "advanced" ? (I = b.value) == null || I.applySavedQuery(D) : a("search", D.filterInfo);
2337
2337
  }
2338
- async function de(D) {
2339
- const z = R.value.find((L) => L.id === D), H = (z == null ? void 0 : z.name) ?? "该查询";
2338
+ async function se(D) {
2339
+ const I = A.value.find((O) => O.id === D), B = (I == null ? void 0 : I.name) ?? "该查询";
2340
2340
  try {
2341
- await vt.confirm(
2342
- `确定要删除快速查询「${H}」吗?`,
2341
+ await kt.confirm(
2342
+ `确定要删除快速查询「${B}」吗?`,
2343
2343
  "删除确认",
2344
2344
  { type: "warning", confirmButtonText: "删除", cancelButtonText: "取消" }
2345
2345
  );
2346
2346
  } catch {
2347
2347
  return;
2348
2348
  }
2349
- await r(R.value.filter((L) => L.id !== D));
2349
+ await s(A.value.filter((O) => O.id !== D));
2350
2350
  }
2351
- return Fe(() => {
2352
- l.singleLine && ($(), g = new ResizeObserver(() => $()), B.value && g.observe(B.value));
2353
- }), je(() => {
2354
- g == null || g.disconnect(), g = null;
2351
+ return Me(() => {
2352
+ l.singleLine && (w(), d = new ResizeObserver(() => w()), P.value && d.observe(P.value));
2353
+ }), Ge(() => {
2354
+ d == null || d.disconnect(), d = null;
2355
2355
  }), me([x, () => l.singleLine], () => {
2356
- He($);
2357
- }), f({
2356
+ Ke(w);
2357
+ }), m({
2358
2358
  filter: _,
2359
2359
  reset: T,
2360
- mode: y
2361
- }), (D, z) => {
2362
- const H = w("el-button"), L = w("el-tooltip"), se = w("el-tag");
2363
- return n(), v("div", {
2364
- class: Se(["yk-filter-panel", { "is-single-line": e.singleLine, "is-collapsed": e.singleLine && x.value }]),
2365
- onKeydown: Ke(E, ["enter"])
2360
+ mode: f
2361
+ }), (D, I) => {
2362
+ const B = C("el-button"), O = C("el-tooltip"), ie = C("el-tag");
2363
+ return n(), g("div", {
2364
+ class: $e(["yk-filter-panel", { "is-single-line": e.singleLine, "is-collapsed": e.singleLine && x.value }]),
2365
+ onKeydown: je(E, ["enter"])
2366
2366
  }, [
2367
- y.value === "simple" ? (n(), v(N, { key: 0 }, [
2368
- e.singleLine ? (n(), h(H, {
2367
+ f.value === "simple" ? (n(), g(L, { key: 0 }, [
2368
+ e.singleLine ? (n(), h(B, {
2369
2369
  key: 0,
2370
2370
  link: "",
2371
2371
  class: "yk-filter-panel__toggle",
2372
2372
  "aria-label": x.value ? "展开更多条件" : "折叠",
2373
2373
  title: x.value ? S.value ? `展开(${S.value} 个条件被隐藏)` : "展开" : "折叠",
2374
- onClick: oe
2374
+ onClick: ee
2375
2375
  }, {
2376
2376
  default: o(() => [
2377
- x.value ? (n(), v("svg", rn, [...z[0] || (z[0] = [
2378
- p("polyline", { points: "6 9 12 15 18 9" }, null, -1),
2379
- p("polyline", { points: "6 14 12 20 18 14" }, null, -1)
2380
- ])])) : (n(), v("svg", un, [...z[1] || (z[1] = [
2381
- p("polyline", { points: "18 15 12 9 6 15" }, null, -1),
2382
- p("polyline", { points: "18 10 12 4 6 10" }, null, -1)
2377
+ x.value ? (n(), g("svg", yn, [...I[0] || (I[0] = [
2378
+ y("polyline", { points: "6 9 12 15 18 9" }, null, -1),
2379
+ y("polyline", { points: "6 14 12 20 18 14" }, null, -1)
2380
+ ])])) : (n(), g("svg", gn, [...I[1] || (I[1] = [
2381
+ y("polyline", { points: "18 15 12 9 6 15" }, null, -1),
2382
+ y("polyline", { points: "18 10 12 4 6 10" }, null, -1)
2383
2383
  ])]))
2384
2384
  ]),
2385
2385
  _: 1
2386
- }, 8, ["aria-label", "title"])) : M("", !0),
2387
- p("div", {
2386
+ }, 8, ["aria-label", "title"])) : R("", !0),
2387
+ y("div", {
2388
2388
  class: "yk-filter-panel__items",
2389
2389
  ref_key: "itemsEl",
2390
- ref: B
2390
+ ref: P
2391
2391
  }, [
2392
- le(D.$slots, "default", {}, void 0, !0)
2392
+ ne(D.$slots, "default", {}, void 0, !0)
2393
2393
  ], 512),
2394
- e.showSearch || e.showReset || e.enableAdvancedFilter ? (n(), v("div", dn, [
2395
- e.showSearch ? (n(), h(H, {
2394
+ e.showSearch || e.showReset || e.enableAdvancedFilter ? (n(), g("div", kn, [
2395
+ e.showSearch ? (n(), h(B, {
2396
2396
  key: 0,
2397
2397
  type: "primary",
2398
- onClick: q
2398
+ onClick: N
2399
2399
  }, {
2400
2400
  default: o(() => [
2401
- C(P(e.searchButtonText), 1)
2401
+ V(z(e.searchButtonText), 1)
2402
2402
  ]),
2403
2403
  _: 1
2404
- })) : M("", !0),
2405
- e.showReset ? (n(), h(H, {
2404
+ })) : R("", !0),
2405
+ e.showReset ? (n(), h(B, {
2406
2406
  key: 1,
2407
2407
  onClick: T
2408
2408
  }, {
2409
2409
  default: o(() => [
2410
- C(P(e.resetButtonText), 1)
2410
+ V(z(e.resetButtonText), 1)
2411
2411
  ]),
2412
2412
  _: 1
2413
- })) : M("", !0),
2414
- e.enableAdvancedFilter && !(e.singleLine && x.value) ? (n(), h(H, {
2413
+ })) : R("", !0),
2414
+ e.enableAdvancedFilter && !(e.singleLine && x.value) ? (n(), h(B, {
2415
2415
  key: 2,
2416
2416
  link: "",
2417
2417
  type: "primary",
2418
2418
  onClick: ue
2419
2419
  }, {
2420
- default: o(() => [...z[2] || (z[2] = [
2421
- C(" 高级查询 ", -1)
2420
+ default: o(() => [...I[2] || (I[2] = [
2421
+ V(" 高级查询 ", -1)
2422
2422
  ])]),
2423
2423
  _: 1
2424
- })) : M("", !0)
2425
- ])) : M("", !0),
2426
- e.showQuickQuery && R.value.length ? (n(), v("div", cn, [
2427
- z[3] || (z[3] = p("span", { class: "yk-filter-panel__saved-label" }, "快速查询:", -1)),
2428
- (n(!0), v(N, null, Z(R.value, (K) => (n(), h(L, {
2429
- key: K.id,
2430
- content: K.description,
2431
- disabled: !K.description,
2424
+ })) : R("", !0)
2425
+ ])) : R("", !0),
2426
+ e.showQuickQuery && A.value.length ? (n(), g("div", _n, [
2427
+ I[3] || (I[3] = y("span", { class: "yk-filter-panel__saved-label" }, "快速查询:", -1)),
2428
+ (n(!0), g(L, null, te(A.value, (W) => (n(), h(O, {
2429
+ key: W.id,
2430
+ content: W.description,
2431
+ disabled: !W.description,
2432
2432
  placement: "top"
2433
2433
  }, {
2434
2434
  default: o(() => [
2435
- c(H, {
2435
+ p(B, {
2436
2436
  size: "small",
2437
- onClick: (ne) => G(K)
2437
+ onClick: (oe) => j(W)
2438
2438
  }, {
2439
2439
  default: o(() => [
2440
- C(P(K.name), 1)
2440
+ V(z(W.name), 1)
2441
2441
  ]),
2442
2442
  _: 2
2443
2443
  }, 1032, ["onClick"])
2444
2444
  ]),
2445
2445
  _: 2
2446
2446
  }, 1032, ["content", "disabled"]))), 128))
2447
- ])) : M("", !0)
2448
- ], 64)) : (n(), v(N, { key: 1 }, [
2449
- p("div", pn, [
2450
- c(H, {
2447
+ ])) : R("", !0)
2448
+ ], 64)) : (n(), g(L, { key: 1 }, [
2449
+ y("div", bn, [
2450
+ p(B, {
2451
2451
  link: "",
2452
2452
  type: "primary",
2453
- onClick: ce
2453
+ onClick: de
2454
2454
  }, {
2455
- default: o(() => [...z[4] || (z[4] = [
2456
- C("← 简单查询", -1)
2455
+ default: o(() => [...I[4] || (I[4] = [
2456
+ V("← 简单查询", -1)
2457
2457
  ])]),
2458
2458
  _: 1
2459
2459
  })
2460
2460
  ]),
2461
- c(wt, {
2461
+ p(St, {
2462
2462
  ref_key: "advancedPanelRef",
2463
2463
  ref: b,
2464
2464
  columns: e.advancedColumns,
2465
2465
  "option-sources": e.advancedOptionSources,
2466
- "saved-queries": R.value,
2467
- onSearch: X,
2468
- onReset: j,
2469
- "onUpdate:savedQueries": r
2466
+ "saved-queries": A.value,
2467
+ onSearch: U,
2468
+ onReset: G,
2469
+ "onUpdate:savedQueries": s
2470
2470
  }, null, 8, ["columns", "option-sources", "saved-queries"]),
2471
- R.value.length ? (n(), v("div", mn, [
2472
- z[5] || (z[5] = p("span", { class: "yk-filter-panel__saved-label" }, "已存查询:", -1)),
2473
- (n(!0), v(N, null, Z(R.value, (K) => (n(), h(L, {
2474
- key: K.id,
2475
- content: K.description,
2476
- disabled: !K.description,
2471
+ A.value.length ? (n(), g("div", hn, [
2472
+ I[5] || (I[5] = y("span", { class: "yk-filter-panel__saved-label" }, "已存查询:", -1)),
2473
+ (n(!0), g(L, null, te(A.value, (W) => (n(), h(O, {
2474
+ key: W.id,
2475
+ content: W.description,
2476
+ disabled: !W.description,
2477
2477
  placement: "top"
2478
2478
  }, {
2479
2479
  default: o(() => [
2480
- c(se, {
2480
+ p(ie, {
2481
2481
  class: "yk-filter-panel__saved-tag",
2482
2482
  effect: "plain",
2483
2483
  closable: "",
2484
- onClick: (ne) => G(K),
2485
- onClose: (ne) => de(K.id)
2484
+ onClick: (oe) => j(W),
2485
+ onClose: (oe) => se(W.id)
2486
2486
  }, {
2487
2487
  default: o(() => [
2488
- C(P(K.name), 1)
2488
+ V(z(W.name), 1)
2489
2489
  ]),
2490
2490
  _: 2
2491
2491
  }, 1032, ["onClick", "onClose"])
2492
2492
  ]),
2493
2493
  _: 2
2494
2494
  }, 1032, ["content", "disabled"]))), 128))
2495
- ])) : M("", !0)
2495
+ ])) : R("", !0)
2496
2496
  ], 64))
2497
2497
  ], 34);
2498
2498
  };
2499
2499
  }
2500
- }), xt = /* @__PURE__ */ ae(fn, [["__scopeId", "data-v-5ec097a2"]]), vn = { class: "yk-filter-item__label" }, yn = { class: "yk-filter-item__control" }, gn = /* @__PURE__ */ ee({
2500
+ }), $t = /* @__PURE__ */ ae(wn, [["__scopeId", "data-v-5ec097a2"]]), xn = { class: "yk-filter-item__label" }, Cn = { class: "yk-filter-item__control" }, Sn = /* @__PURE__ */ Z({
2501
2501
  name: "YsFilterItemLayout",
2502
2502
  __name: "filterItemLayout",
2503
2503
  props: {
@@ -2512,23 +2512,23 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
2512
2512
  api: { type: Object, required: !0 }
2513
2513
  },
2514
2514
  setup(e) {
2515
- const f = e, t = dt(ft, null);
2515
+ const m = e, t = mt(gt, null);
2516
2516
  let l = null;
2517
- return Fe(() => {
2518
- t && (l = t(f.api));
2519
- }), je(() => {
2517
+ return Me(() => {
2518
+ t && (l = t(m.api));
2519
+ }), Ge(() => {
2520
2520
  l == null || l();
2521
- }), (a, k) => (n(), v("div", {
2521
+ }), (a, k) => (n(), g("div", {
2522
2522
  class: "yk-filter-item",
2523
- style: it({ minWidth: e.minWidth + "px" })
2523
+ style: ct({ minWidth: e.minWidth + "px" })
2524
2524
  }, [
2525
- p("label", vn, P(e.label), 1),
2526
- p("div", yn, [
2527
- le(a.$slots, "default", {}, void 0, !0)
2525
+ y("label", xn, z(e.label), 1),
2526
+ y("div", Cn, [
2527
+ ne(a.$slots, "default", {}, void 0, !0)
2528
2528
  ])
2529
2529
  ], 4));
2530
2530
  }
2531
- }), Ie = /* @__PURE__ */ ae(gn, [["__scopeId", "data-v-2f9ea4d2"]]), kn = /* @__PURE__ */ ee({
2531
+ }), Ye = /* @__PURE__ */ ae(Sn, [["__scopeId", "data-v-2f9ea4d2"]]), $n = /* @__PURE__ */ Z({
2532
2532
  name: "YsTextFilterItem",
2533
2533
  __name: "textFilterItem",
2534
2534
  props: {
@@ -2551,23 +2551,23 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
2551
2551
  /** 占位文本 */
2552
2552
  placeholder: { type: String, required: !1 }
2553
2553
  },
2554
- setup(e, { expose: f }) {
2555
- const t = e, { value: l, filter: a, reset: k } = Yt(t), u = {
2554
+ setup(e, { expose: m }) {
2555
+ const t = e, { value: l, filter: a, reset: k } = Ut(t), r = {
2556
2556
  get filter() {
2557
2557
  return a.value;
2558
2558
  },
2559
2559
  reset: k
2560
2560
  };
2561
- return f(u), (A, y) => {
2562
- const x = w("el-input");
2563
- return n(), h(Ie, {
2561
+ return m(r), ($, f) => {
2562
+ const x = C("el-input");
2563
+ return n(), h(Ye, {
2564
2564
  label: e.label,
2565
- api: u
2565
+ api: r
2566
2566
  }, {
2567
2567
  default: o(() => [
2568
- c(x, {
2569
- modelValue: i(l),
2570
- "onUpdate:modelValue": y[0] || (y[0] = (S) => Ce(l) ? l.value = S : null),
2568
+ p(x, {
2569
+ modelValue: u(l),
2570
+ "onUpdate:modelValue": f[0] || (f[0] = (S) => Se(l) ? l.value = S : null),
2571
2571
  placeholder: e.placeholder,
2572
2572
  clearable: ""
2573
2573
  }, null, 8, ["modelValue", "placeholder"])
@@ -2576,7 +2576,7 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
2576
2576
  }, 8, ["label"]);
2577
2577
  };
2578
2578
  }
2579
- }), _n = /* @__PURE__ */ ee({
2579
+ }), Vn = /* @__PURE__ */ Z({
2580
2580
  name: "YsDateFilterItem",
2581
2581
  __name: "dateFilterItem",
2582
2582
  props: {
@@ -2600,23 +2600,23 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
2600
2600
  /** el-date-picker value-format,默认 'YYYY-MM-DD'(v-model 绑字符串) */
2601
2601
  valueFormat: { type: String, default: "YYYY-MM-DD" }
2602
2602
  },
2603
- setup(e, { expose: f }) {
2604
- const t = e, { value: l, filter: a, reset: k } = Nt(t), u = {
2603
+ setup(e, { expose: m }) {
2604
+ const t = e, { value: l, filter: a, reset: k } = Lt(t), r = {
2605
2605
  get filter() {
2606
2606
  return a.value;
2607
2607
  },
2608
2608
  reset: k
2609
2609
  };
2610
- return f(u), (A, y) => {
2611
- const x = w("el-date-picker");
2612
- return n(), h(Ie, {
2610
+ return m(r), ($, f) => {
2611
+ const x = C("el-date-picker");
2612
+ return n(), h(Ye, {
2613
2613
  label: e.label,
2614
- api: u
2614
+ api: r
2615
2615
  }, {
2616
2616
  default: o(() => [
2617
- c(x, {
2618
- modelValue: i(l),
2619
- "onUpdate:modelValue": y[0] || (y[0] = (S) => Ce(l) ? l.value = S : null),
2617
+ p(x, {
2618
+ modelValue: u(l),
2619
+ "onUpdate:modelValue": f[0] || (f[0] = (S) => Se(l) ? l.value = S : null),
2620
2620
  type: "date",
2621
2621
  placeholder: e.placeholder,
2622
2622
  "value-format": e.valueFormat,
@@ -2627,7 +2627,7 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
2627
2627
  }, 8, ["label"]);
2628
2628
  };
2629
2629
  }
2630
- }), bn = /* @__PURE__ */ ee({
2630
+ }), Fn = /* @__PURE__ */ Z({
2631
2631
  name: "YsDateRangeFilterItem",
2632
2632
  __name: "dateRangeFilterItem",
2633
2633
  props: {
@@ -2656,24 +2656,24 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
2656
2656
  required: !1
2657
2657
  }
2658
2658
  },
2659
- setup(e, { expose: f }) {
2660
- const t = e, { value: l, filter: a, reset: k } = qt(t), u = {
2659
+ setup(e, { expose: m }) {
2660
+ const t = e, { value: l, filter: a, reset: k } = Ht(t), r = {
2661
2661
  get filter() {
2662
2662
  return a.value;
2663
2663
  },
2664
2664
  reset: k
2665
2665
  };
2666
- return f(u), (A, y) => {
2667
- const x = w("el-date-picker");
2668
- return n(), h(Ie, {
2666
+ return m(r), ($, f) => {
2667
+ const x = C("el-date-picker");
2668
+ return n(), h(Ye, {
2669
2669
  label: e.label,
2670
- api: u,
2670
+ api: r,
2671
2671
  "min-width": 240
2672
2672
  }, {
2673
2673
  default: o(() => [
2674
- c(x, {
2675
- modelValue: i(l),
2676
- "onUpdate:modelValue": y[0] || (y[0] = (S) => Ce(l) ? l.value = S : null),
2674
+ p(x, {
2675
+ modelValue: u(l),
2676
+ "onUpdate:modelValue": f[0] || (f[0] = (S) => Se(l) ? l.value = S : null),
2677
2677
  type: "daterange",
2678
2678
  "start-placeholder": e.startPlaceholder,
2679
2679
  "end-placeholder": e.endPlaceholder,
@@ -2686,7 +2686,7 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
2686
2686
  }, 8, ["label"]);
2687
2687
  };
2688
2688
  }
2689
- }), hn = /* @__PURE__ */ ee({
2689
+ }), Mn = /* @__PURE__ */ Z({
2690
2690
  name: "YsEnumFilterItem",
2691
2691
  __name: "enumFilterItem",
2692
2692
  props: {
@@ -2723,19 +2723,19 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
2723
2723
  /** 是否多选;默认 false。多选时 2+ 项用 In,1 项用 Equals,0 项返回 null */
2724
2724
  multiple: { type: Boolean, default: !1 }
2725
2725
  },
2726
- setup(e, { expose: f }) {
2727
- const t = e, { value: l, filter: a, reset: k } = Ot(t), u = Q({
2726
+ setup(e, { expose: m }) {
2727
+ const t = e, { value: l, filter: a, reset: k } = Kt(t), r = Q({
2728
2728
  get: () => l.value,
2729
2729
  set: (S) => {
2730
2730
  l.value = S;
2731
2731
  }
2732
- }), A = I([]), y = I(!1);
2733
- Fe(async () => {
2734
- y.value = !0;
2732
+ }), $ = Y([]), f = Y(!1);
2733
+ Me(async () => {
2734
+ f.value = !0;
2735
2735
  try {
2736
- A.value = await t.optionsSource();
2736
+ $.value = await t.optionsSource();
2737
2737
  } finally {
2738
- y.value = !1;
2738
+ f.value = !1;
2739
2739
  }
2740
2740
  });
2741
2741
  const x = {
@@ -2744,23 +2744,23 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
2744
2744
  },
2745
2745
  reset: k
2746
2746
  };
2747
- return f(x), (S, B) => {
2748
- const U = w("el-option"), R = w("el-select");
2749
- return n(), h(Ie, {
2747
+ return m(x), (S, P) => {
2748
+ const H = C("el-option"), A = C("el-select");
2749
+ return n(), h(Ye, {
2750
2750
  label: e.label,
2751
2751
  api: x
2752
2752
  }, {
2753
2753
  default: o(() => [
2754
- c(R, {
2755
- modelValue: u.value,
2756
- "onUpdate:modelValue": B[0] || (B[0] = (b) => u.value = b),
2754
+ p(A, {
2755
+ modelValue: r.value,
2756
+ "onUpdate:modelValue": P[0] || (P[0] = (b) => r.value = b),
2757
2757
  multiple: e.multiple,
2758
2758
  placeholder: e.placeholder,
2759
2759
  clearable: e.clearable,
2760
- loading: y.value
2760
+ loading: f.value
2761
2761
  }, {
2762
2762
  default: o(() => [
2763
- (n(!0), v(N, null, Z(A.value, (b) => (n(), h(U, {
2763
+ (n(!0), g(L, null, te($.value, (b) => (n(), h(H, {
2764
2764
  key: String(b.value),
2765
2765
  value: b.value,
2766
2766
  label: b.label
@@ -2773,7 +2773,7 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
2773
2773
  }, 8, ["label"]);
2774
2774
  };
2775
2775
  }
2776
- }), wn = { class: "yk-table-page" }, xn = /* @__PURE__ */ ee({
2776
+ }), An = { class: "yk-table-page" }, Rn = /* @__PURE__ */ Z({
2777
2777
  name: "YsTablePage",
2778
2778
  __name: "tablePage",
2779
2779
  props: {
@@ -2807,10 +2807,10 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
2807
2807
  singleLine: { type: Boolean, default: !1 }
2808
2808
  },
2809
2809
  emits: ["search", "reset", "update:quickQueries", "data-loaded", "update:viewMode", "update:showCheckbox", "update:columnResizable", "update:stickyHeader"],
2810
- setup(e, { expose: f, emit: t }) {
2811
- const l = e, a = t, k = Rt(tt()), u = I(null), A = I(null), y = Q(() => async (R, b) => l.dataFun(R, k.value, b)), x = Q(() => ({
2810
+ setup(e, { expose: m, emit: t }) {
2811
+ const l = e, a = t, k = Pt(lt()), r = Y(null), $ = Y(null), f = Q(() => async (A, b) => l.dataFun(A, k.value, b)), x = Q(() => ({
2812
2812
  metaFun: l.metaFun,
2813
- dataFun: y.value,
2813
+ dataFun: f.value,
2814
2814
  rowActionsFunc: l.rowActionsFunc,
2815
2815
  pageSize: l.pageSize,
2816
2816
  pageSizes: l.pageSizes,
@@ -2837,49 +2837,49 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
2837
2837
  saveQuickQueryFun: l.saveQuickQueryFun,
2838
2838
  singleLine: l.singleLine
2839
2839
  }));
2840
- function B(R) {
2840
+ function P(A) {
2841
2841
  var b;
2842
- k.value = R, a("search", R), (b = u.value) == null || b.reload();
2842
+ k.value = A, a("search", A), (b = r.value) == null || b.reload();
2843
2843
  }
2844
- function U() {
2845
- var R;
2846
- k.value = tt(), a("reset"), (R = u.value) == null || R.reload();
2844
+ function H() {
2845
+ var A;
2846
+ k.value = lt(), a("reset"), (A = r.value) == null || A.reload();
2847
2847
  }
2848
- return f({
2849
- table: u,
2850
- filterPanel: A
2851
- }), (R, b) => (n(), v("div", wn, [
2852
- c(xt, Xe({
2848
+ return m({
2849
+ table: r,
2850
+ filterPanel: $
2851
+ }), (A, b) => (n(), g("div", An, [
2852
+ p($t, Ze({
2853
2853
  ref_key: "filterPanelRef",
2854
- ref: A,
2854
+ ref: $,
2855
2855
  class: "yk-table-page__filter"
2856
2856
  }, S.value, {
2857
- onSearch: B,
2858
- onReset: U,
2857
+ onSearch: P,
2858
+ onReset: H,
2859
2859
  "onUpdate:quickQueries": b[0] || (b[0] = (_) => a("update:quickQueries", _))
2860
2860
  }), {
2861
2861
  default: o(() => [
2862
- le(R.$slots, "default", {}, void 0, !0)
2862
+ ne(A.$slots, "default", {}, void 0, !0)
2863
2863
  ]),
2864
2864
  _: 3
2865
2865
  }, 16),
2866
- c(kt, {
2866
+ p(ht, {
2867
2867
  class: "yk-table-page__command",
2868
2868
  actions: l.actions,
2869
- table: u.value,
2869
+ table: r.value,
2870
2870
  "show-action-menu-button": l.showActionMenuButton
2871
2871
  }, Be({ _: 2 }, [
2872
- R.$slots["command-bar"] ? {
2872
+ A.$slots["command-bar"] ? {
2873
2873
  name: "default",
2874
2874
  fn: o(() => [
2875
- le(R.$slots, "command-bar", {}, void 0, !0)
2875
+ ne(A.$slots, "command-bar", {}, void 0, !0)
2876
2876
  ]),
2877
2877
  key: "0"
2878
2878
  } : void 0
2879
2879
  ]), 1032, ["actions", "table", "show-action-menu-button"]),
2880
- c(yt, Xe({
2880
+ p(_t, Ze({
2881
2881
  ref_key: "tableRef",
2882
- ref: u,
2882
+ ref: r,
2883
2883
  class: "yk-table-page__table"
2884
2884
  }, x.value, {
2885
2885
  onDataLoaded: b[1] || (b[1] = (_) => a("data-loaded", _)),
@@ -2888,46 +2888,46 @@ import './index.css';const Kt = { class: "export-options" }, jt = { class: "expo
2888
2888
  "onUpdate:columnResizable": b[4] || (b[4] = (_) => a("update:columnResizable", _)),
2889
2889
  "onUpdate:stickyHeader": b[5] || (b[5] = (_) => a("update:stickyHeader", _))
2890
2890
  }), Be({ _: 2 }, [
2891
- R.$slots.card ? {
2891
+ A.$slots.card ? {
2892
2892
  name: "card",
2893
2893
  fn: o((_) => [
2894
- le(R.$slots, "card", Qe(Ee(_)), void 0, !0)
2894
+ ne(A.$slots, "card", Ie(Te(_)), void 0, !0)
2895
2895
  ]),
2896
2896
  key: "0"
2897
2897
  } : void 0,
2898
- R.$slots.list ? {
2898
+ A.$slots.list ? {
2899
2899
  name: "list",
2900
2900
  fn: o((_) => [
2901
- le(R.$slots, "list", Qe(Ee(_)), void 0, !0)
2901
+ ne(A.$slots, "list", Ie(Te(_)), void 0, !0)
2902
2902
  ]),
2903
2903
  key: "1"
2904
2904
  } : void 0,
2905
- R.$slots.empty ? {
2905
+ A.$slots.empty ? {
2906
2906
  name: "empty",
2907
2907
  fn: o((_) => [
2908
- le(R.$slots, "empty", Qe(Ee(_)), void 0, !0)
2908
+ ne(A.$slots, "empty", Ie(Te(_)), void 0, !0)
2909
2909
  ]),
2910
2910
  key: "2"
2911
2911
  } : void 0,
2912
- R.$slots.loading ? {
2912
+ A.$slots.loading ? {
2913
2913
  name: "loading",
2914
2914
  fn: o((_) => [
2915
- le(R.$slots, "loading", Qe(Ee(_)), void 0, !0)
2915
+ ne(A.$slots, "loading", Ie(Te(_)), void 0, !0)
2916
2916
  ]),
2917
2917
  key: "3"
2918
2918
  } : void 0,
2919
- R.$slots.footer ? {
2919
+ A.$slots.footer ? {
2920
2920
  name: "footer",
2921
2921
  fn: o((_) => [
2922
- le(R.$slots, "footer", Qe(Ee(_)), void 0, !0)
2922
+ ne(A.$slots, "footer", Ie(Te(_)), void 0, !0)
2923
2923
  ]),
2924
2924
  key: "4"
2925
2925
  } : void 0
2926
2926
  ]), 1040)
2927
2927
  ]));
2928
2928
  }
2929
- }), Cn = /* @__PURE__ */ ae(xn, [["__scopeId", "data-v-0ae6f764"]]);
2930
- function Ct(e) {
2929
+ }), Pn = /* @__PURE__ */ ae(Rn, [["__scopeId", "data-v-1cfd74f0"]]);
2930
+ function Vt(e) {
2931
2931
  if (e == null) return "";
2932
2932
  if (typeof e == "object")
2933
2933
  try {
@@ -2937,7 +2937,7 @@ function Ct(e) {
2937
2937
  }
2938
2938
  return String(e);
2939
2939
  }
2940
- const Sn = /* @__PURE__ */ ee({
2940
+ const zn = /* @__PURE__ */ Z({
2941
2941
  __name: "importRowEditDialog",
2942
2942
  props: {
2943
2943
  visible: { type: Boolean },
@@ -2946,52 +2946,52 @@ const Sn = /* @__PURE__ */ ee({
2946
2946
  saver: { type: Function }
2947
2947
  },
2948
2948
  emits: ["update:visible", "saved"],
2949
- setup(e, { emit: f }) {
2950
- const t = e, l = f, a = I({}), k = I([]);
2949
+ setup(e, { emit: m }) {
2950
+ const t = e, l = m, a = Y({}), k = Y([]);
2951
2951
  me(
2952
2952
  () => t.visible,
2953
- (y) => {
2954
- if (!y || !t.row) return;
2953
+ (f) => {
2954
+ if (!f || !t.row) return;
2955
2955
  const x = {};
2956
2956
  for (const S of t.columns)
2957
- x[S.name] = Ct(t.row.data[S.name]);
2957
+ x[S.name] = Vt(t.row.data[S.name]);
2958
2958
  a.value = x, k.value = [];
2959
2959
  }
2960
2960
  );
2961
- function u() {
2961
+ function r() {
2962
2962
  l("update:visible", !1);
2963
2963
  }
2964
- function A() {
2964
+ function $() {
2965
2965
  if (!t.row) return;
2966
- const y = {};
2967
- for (const B of t.columns)
2968
- y[B.name] = a.value[B.name] ?? "";
2969
- const { row: x, errors: S } = t.saver(t.row, y);
2966
+ const f = {};
2967
+ for (const P of t.columns)
2968
+ f[P.name] = a.value[P.name] ?? "";
2969
+ const { row: x, errors: S } = t.saver(t.row, f);
2970
2970
  k.value = S, !(S.length > 0) && (l("saved", x), l("update:visible", !1));
2971
2971
  }
2972
- return (y, x) => {
2973
- const S = w("el-alert"), B = w("el-input"), U = w("el-form-item"), R = w("el-form"), b = w("el-button"), _ = w("el-dialog");
2972
+ return (f, x) => {
2973
+ const S = C("el-alert"), P = C("el-input"), H = C("el-form-item"), A = C("el-form"), b = C("el-button"), _ = C("el-dialog");
2974
2974
  return n(), h(_, {
2975
2975
  "model-value": e.visible,
2976
2976
  title: e.row ? `编辑第 ${e.row.rowNumber} 行` : "编辑数据行",
2977
2977
  width: "480px",
2978
2978
  "append-to-body": "",
2979
2979
  "close-on-click-modal": !1,
2980
- "onUpdate:modelValue": x[1] || (x[1] = (q) => l("update:visible", q))
2980
+ "onUpdate:modelValue": x[1] || (x[1] = (N) => l("update:visible", N))
2981
2981
  }, {
2982
2982
  footer: o(() => [
2983
- c(b, { onClick: u }, {
2983
+ p(b, { onClick: r }, {
2984
2984
  default: o(() => [...x[2] || (x[2] = [
2985
- C("取消", -1)
2985
+ V("取消", -1)
2986
2986
  ])]),
2987
2987
  _: 1
2988
2988
  }),
2989
- c(b, {
2989
+ p(b, {
2990
2990
  type: "primary",
2991
- onClick: A
2991
+ onClick: $
2992
2992
  }, {
2993
2993
  default: o(() => [...x[3] || (x[3] = [
2994
- C("保存并重新校验", -1)
2994
+ V("保存并重新校验", -1)
2995
2995
  ])]),
2996
2996
  _: 1
2997
2997
  })
@@ -3005,27 +3005,27 @@ const Sn = /* @__PURE__ */ ee({
3005
3005
  "show-icon": ""
3006
3006
  }, {
3007
3007
  default: o(() => [
3008
- (n(!0), v(N, null, Z(k.value, (q, T) => (n(), v("div", { key: T }, P(q), 1))), 128))
3008
+ (n(!0), g(L, null, te(k.value, (N, T) => (n(), g("div", { key: T }, z(N), 1))), 128))
3009
3009
  ]),
3010
3010
  _: 1
3011
- })) : M("", !0),
3012
- c(R, {
3011
+ })) : R("", !0),
3012
+ p(A, {
3013
3013
  "label-width": "92px",
3014
- onSubmit: x[0] || (x[0] = rt(() => {
3014
+ onSubmit: x[0] || (x[0] = dt(() => {
3015
3015
  }, ["prevent"]))
3016
3016
  }, {
3017
3017
  default: o(() => [
3018
- (n(!0), v(N, null, Z(e.columns, (q) => (n(), h(U, {
3019
- key: q.name,
3020
- label: q.name,
3021
- required: !q.optional
3018
+ (n(!0), g(L, null, te(e.columns, (N) => (n(), h(H, {
3019
+ key: N.name,
3020
+ label: N.name,
3021
+ required: !N.optional
3022
3022
  }, {
3023
3023
  default: o(() => [
3024
- c(B, {
3025
- modelValue: a.value[q.name],
3026
- "onUpdate:modelValue": (T) => a.value[q.name] = T,
3027
- placeholder: q.optional ? "可留空" : `请输入${q.name}`,
3028
- onKeyup: Ke(A, ["enter"])
3024
+ p(P, {
3025
+ modelValue: a.value[N.name],
3026
+ "onUpdate:modelValue": (T) => a.value[N.name] = T,
3027
+ placeholder: N.optional ? "可留空" : `请输入${N.name}`,
3028
+ onKeyup: je($, ["enter"])
3029
3029
  }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
3030
3030
  ]),
3031
3031
  _: 2
@@ -3038,28 +3038,28 @@ const Sn = /* @__PURE__ */ ee({
3038
3038
  }, 8, ["model-value", "title"]);
3039
3039
  };
3040
3040
  }
3041
- }), $n = /* @__PURE__ */ ae(Sn, [["__scopeId", "data-v-4f9c19a4"]]), Vn = ["accept"], Fn = { class: "yk-import-excel__toolbar" }, Rn = ["title"], An = {
3041
+ }), Bn = /* @__PURE__ */ ae(zn, [["__scopeId", "data-v-24918b65"]]), Dn = ["accept"], En = { class: "yk-import-excel__toolbar" }, In = ["title"], Tn = {
3042
3042
  key: 2,
3043
3043
  class: "yk-import-excel__stats"
3044
- }, Mn = { class: "yk-import-excel__stat" }, Pn = { class: "yk-import-excel__stat" }, Bn = { class: "yk-import-excel__stat yk-import-excel__stat--danger" }, Dn = {
3044
+ }, Qn = { class: "yk-import-excel__stat" }, Yn = { class: "yk-import-excel__stat" }, Nn = { class: "yk-import-excel__stat yk-import-excel__stat--danger" }, qn = {
3045
3045
  key: 0,
3046
3046
  class: "yk-import-excel__progress"
3047
- }, zn = { class: "yk-import-excel__progress-meta" }, Qn = { class: "yk-import-excel__danger-text" }, En = { class: "yk-import-excel__progress-eta" }, Tn = { class: "yk-import-excel__body" }, In = ["title"], Yn = {
3047
+ }, On = { class: "yk-import-excel__progress-meta" }, Un = { class: "yk-import-excel__danger-text" }, Ln = { class: "yk-import-excel__progress-eta" }, Hn = { class: "yk-import-excel__body" }, Kn = ["title"], jn = {
3048
3048
  key: 0,
3049
3049
  class: "yk-import-excel__spin"
3050
- }, Nn = {
3050
+ }, Gn = {
3051
3051
  key: 0,
3052
3052
  class: "yk-import-excel__msg yk-import-excel__msg--danger"
3053
- }, qn = {
3053
+ }, Wn = {
3054
3054
  key: 1,
3055
3055
  class: "yk-import-excel__msg yk-import-excel__msg--danger"
3056
- }, On = {
3056
+ }, Jn = {
3057
3057
  key: 1,
3058
3058
  class: "yk-import-excel__action-placeholder"
3059
- }, Un = { class: "yk-import-excel__empty-hint" }, Ln = {
3059
+ }, Xn = { class: "yk-import-excel__empty-hint" }, Zn = {
3060
3060
  key: 1,
3061
3061
  class: "yk-import-excel__drop-mask"
3062
- }, Hn = /* @__PURE__ */ ee({
3062
+ }, eo = /* @__PURE__ */ Z({
3063
3063
  __name: "importExcel",
3064
3064
  props: {
3065
3065
  columns: {},
@@ -3069,369 +3069,369 @@ const Sn = /* @__PURE__ */ ee({
3069
3069
  autoScroll: { type: Boolean, default: !0 }
3070
3070
  },
3071
3071
  emits: ["loaded", "selection-change", "processed", "row-update", "row-remove"],
3072
- setup(e, { expose: f, emit: t }) {
3072
+ setup(e, { expose: m, emit: t }) {
3073
3073
  const l = e, a = t, {
3074
3074
  rows: k,
3075
- fileName: u,
3076
- sheetName: A,
3077
- loading: y,
3075
+ fileName: r,
3076
+ sheetName: $,
3077
+ loading: f,
3078
3078
  processing: x,
3079
3079
  stopping: S,
3080
- processingTotal: B,
3081
- progressDone: U,
3082
- progressSuccess: R,
3080
+ processingTotal: P,
3081
+ progressDone: H,
3082
+ progressSuccess: A,
3083
3083
  progressFailed: b,
3084
3084
  hasData: _,
3085
- invalidCount: q,
3085
+ invalidCount: N,
3086
3086
  successCount: T,
3087
- failedCount: X,
3088
- selectedCount: j,
3089
- pendingCount: r,
3090
- loadFile: m,
3087
+ failedCount: U,
3088
+ selectedCount: G,
3089
+ pendingCount: s,
3090
+ loadFile: v,
3091
3091
  syncSelection: F,
3092
- saveRowEdit: Y,
3092
+ saveRowEdit: q,
3093
3093
  removeRow: E,
3094
3094
  startProcessing: ue,
3095
- stopProcessing: ce,
3096
- clear: oe
3097
- } = Ut({
3095
+ stopProcessing: de,
3096
+ clear: ee
3097
+ } = jt({
3098
3098
  columns: ve(l, "columns"),
3099
3099
  processor: ve(l, "processor"),
3100
3100
  parser: ve(l, "parser")
3101
- }), $ = I(), g = I(), G = {
3101
+ }), w = Y(), d = Y(), j = {
3102
3102
  valid: { label: "待处理", type: "info" },
3103
3103
  invalid: { label: "校验失败", type: "danger" },
3104
3104
  processing: { label: "处理中", type: "warning" },
3105
3105
  success: { label: "成功", type: "success" },
3106
3106
  failed: { label: "失败", type: "danger" }
3107
- }, de = Q(
3108
- () => Object.keys(G).map((d) => ({
3109
- text: `${G[d].label}(${k.value.filter((V) => V.status === d).length})`,
3110
- value: d
3107
+ }, se = Q(
3108
+ () => Object.keys(j).map((c) => ({
3109
+ text: `${j[c].label}(${k.value.filter((M) => M.status === c).length})`,
3110
+ value: c
3111
3111
  }))
3112
3112
  );
3113
- function D(d, V) {
3114
- return V.status === d;
3113
+ function D(c, M) {
3114
+ return M.status === c;
3115
3115
  }
3116
- function z(d) {
3117
- var ie, we;
3116
+ function I(c) {
3117
+ var ce, xe;
3118
3118
  if (!l.autoScroll) return;
3119
- const V = (ie = $.value) == null ? void 0 : ie.$el, O = V == null ? void 0 : V.querySelector(".el-table__body-wrapper .el-scrollbar__wrap"), te = V == null ? void 0 : V.querySelector(".el-table__body-wrapper tbody");
3120
- if (!V || !O || !te) return;
3121
- const s = k.value.findIndex((St) => St.rowNumber === d), W = te.querySelectorAll("tr")[s];
3122
- if (!W) return;
3123
- const re = O.getBoundingClientRect(), ke = W.getBoundingClientRect(), J = Math.max(0, O.scrollHeight - O.clientHeight), _e = O.scrollTop + (ke.top - re.top) - (O.clientHeight - ke.height) / 2;
3124
- (we = $.value) == null || we.setScrollTop(Math.min(J, Math.max(0, Math.round(_e))));
3119
+ const M = (ce = w.value) == null ? void 0 : ce.$el, K = M == null ? void 0 : M.querySelector(".el-table__body-wrapper .el-scrollbar__wrap"), le = M == null ? void 0 : M.querySelector(".el-table__body-wrapper tbody");
3120
+ if (!M || !K || !le) return;
3121
+ const i = k.value.findIndex((Ft) => Ft.rowNumber === c), J = le.querySelectorAll("tr")[i];
3122
+ if (!J) return;
3123
+ const re = K.getBoundingClientRect(), _e = J.getBoundingClientRect(), X = Math.max(0, K.scrollHeight - K.clientHeight), be = K.scrollTop + (_e.top - re.top) - (K.clientHeight - _e.height) / 2;
3124
+ (xe = w.value) == null || xe.setScrollTop(Math.min(X, Math.max(0, Math.round(be))));
3125
3125
  }
3126
3126
  me(
3127
3127
  () => {
3128
- var d;
3129
- return ((d = k.value.find((V) => V.status === "processing")) == null ? void 0 : d.rowNumber) ?? null;
3128
+ var c;
3129
+ return ((c = k.value.find((M) => M.status === "processing")) == null ? void 0 : c.rowNumber) ?? null;
3130
3130
  },
3131
- (d) => {
3132
- d !== null && He(() => z(d));
3131
+ (c) => {
3132
+ c !== null && Ke(() => I(c));
3133
3133
  }
3134
3134
  );
3135
- const H = I(0), L = I(0);
3136
- let se;
3137
- const K = Q(() => {
3138
- const d = B.value;
3139
- return d <= 0 ? 0 : Math.min(100, U.value / d * 100);
3135
+ const B = Y(0), O = Y(0);
3136
+ let ie;
3137
+ const W = Q(() => {
3138
+ const c = P.value;
3139
+ return c <= 0 ? 0 : Math.min(100, H.value / c * 100);
3140
3140
  });
3141
- function ne() {
3142
- return `${U.value}/${B.value}`;
3141
+ function oe() {
3142
+ return `${H.value}/${P.value}`;
3143
3143
  }
3144
- const ge = Q(() => {
3145
- if (!x.value || U.value === 0) return "预计剩余 计算中…";
3146
- const V = (L.value - H.value) / U.value, O = B.value - U.value;
3147
- return `预计剩余 ${xe(V * O)}`;
3144
+ const ke = Q(() => {
3145
+ if (!x.value || H.value === 0) return "预计剩余 计算中…";
3146
+ const M = (O.value - B.value) / H.value, K = P.value - H.value;
3147
+ return `预计剩余 ${Ce(M * K)}`;
3148
3148
  });
3149
- function xe(d) {
3150
- const V = Math.max(0, Math.ceil(d / 1e3));
3151
- if (V < 60) return `${V} 秒`;
3152
- const O = Math.floor(V / 60), te = V % 60;
3153
- return te > 0 ? `${O} 分 ${te} 秒` : `${O} 分`;
3154
- }
3155
- me(x, (d) => {
3156
- d ? (H.value = Date.now(), L.value = H.value, se = setInterval(() => {
3157
- L.value = Date.now();
3158
- }, 500)) : se && (clearInterval(se), se = void 0);
3159
- }), je(() => {
3160
- se && clearInterval(se);
3149
+ function Ce(c) {
3150
+ const M = Math.max(0, Math.ceil(c / 1e3));
3151
+ if (M < 60) return `${M} 秒`;
3152
+ const K = Math.floor(M / 60), le = M % 60;
3153
+ return le > 0 ? `${K} 分 ${le} 秒` : `${K} 分`;
3154
+ }
3155
+ me(x, (c) => {
3156
+ c ? (B.value = Date.now(), O.value = B.value, ie = setInterval(() => {
3157
+ O.value = Date.now();
3158
+ }, 500)) : ie && (clearInterval(ie), ie = void 0);
3159
+ }), Ge(() => {
3160
+ ie && clearInterval(ie);
3161
3161
  });
3162
3162
  function pe() {
3163
- var d;
3164
- (d = g.value) == null || d.click();
3165
- }
3166
- const be = I(0), he = Q(() => be.value > 0);
3167
- function $e(d) {
3168
- var V;
3169
- return Array.from(((V = d.dataTransfer) == null ? void 0 : V.types) ?? []).includes("Files");
3170
- }
3171
- function Ye(d) {
3172
- const V = l.accept.split(",").map((te) => te.trim().toLowerCase()).filter(Boolean);
3173
- if (V.length === 0) return !0;
3174
- const O = d.name.toLowerCase();
3175
- return V.some((te) => O.endsWith(te));
3176
- }
3177
- async function Re(d) {
3178
- var V;
3179
- if (!y.value) {
3180
- if (!Ye(d)) {
3163
+ var c;
3164
+ (c = d.value) == null || c.click();
3165
+ }
3166
+ const he = Y(0), we = Q(() => he.value > 0);
3167
+ function Ve(c) {
3168
+ var M;
3169
+ return Array.from(((M = c.dataTransfer) == null ? void 0 : M.types) ?? []).includes("Files");
3170
+ }
3171
+ function Ne(c) {
3172
+ const M = l.accept.split(",").map((le) => le.trim().toLowerCase()).filter(Boolean);
3173
+ if (M.length === 0) return !0;
3174
+ const K = c.name.toLowerCase();
3175
+ return M.some((le) => K.endsWith(le));
3176
+ }
3177
+ async function Ae(c) {
3178
+ var M;
3179
+ if (!f.value) {
3180
+ if (!Ne(c)) {
3181
3181
  fe.error(`仅支持 ${l.accept} 格式的文件`);
3182
3182
  return;
3183
3183
  }
3184
3184
  try {
3185
- const O = await m(d);
3186
- a("loaded", O), await He();
3187
- for (const te of k.value)
3188
- te.status !== "invalid" && ((V = $.value) == null || V.toggleRowSelection(te, !0));
3189
- fe.success(`已加载 ${O.length} 行(工作表「${A.value}」)`);
3190
- } catch (O) {
3191
- fe.error(O instanceof Error ? O.message : String(O));
3185
+ const K = await v(c);
3186
+ a("loaded", K), await Ke();
3187
+ for (const le of k.value)
3188
+ le.status !== "invalid" && ((M = w.value) == null || M.toggleRowSelection(le, !0));
3189
+ fe.success(`已加载 ${K.length} 行(工作表「${$.value}」)`);
3190
+ } catch (K) {
3191
+ fe.error(K instanceof Error ? K.message : String(K));
3192
3192
  }
3193
3193
  }
3194
3194
  }
3195
- async function Ve(d) {
3196
- var te;
3197
- const V = d.target, O = (te = V.files) == null ? void 0 : te[0];
3198
- V.value = "", O && await Re(O);
3195
+ async function Fe(c) {
3196
+ var le;
3197
+ const M = c.target, K = (le = M.files) == null ? void 0 : le[0];
3198
+ M.value = "", K && await Ae(K);
3199
3199
  }
3200
- function Ne(d) {
3201
- $e(d) && (be.value += 1);
3200
+ function qe(c) {
3201
+ Ve(c) && (he.value += 1);
3202
3202
  }
3203
- function De(d) {
3204
- $e(d) && (d.preventDefault(), d.dataTransfer && (d.dataTransfer.dropEffect = "copy"));
3203
+ function De(c) {
3204
+ Ve(c) && (c.preventDefault(), c.dataTransfer && (c.dataTransfer.dropEffect = "copy"));
3205
3205
  }
3206
- function Ae(d) {
3207
- $e(d) && (be.value = Math.max(0, be.value - 1));
3206
+ function Re(c) {
3207
+ Ve(c) && (he.value = Math.max(0, he.value - 1));
3208
3208
  }
3209
- function qe(d) {
3210
- var O, te;
3211
- if (!$e(d)) return;
3212
- d.preventDefault(), be.value = 0;
3213
- const V = (te = (O = d.dataTransfer) == null ? void 0 : O.files) == null ? void 0 : te[0];
3214
- V && Re(V);
3209
+ function Oe(c) {
3210
+ var K, le;
3211
+ if (!Ve(c)) return;
3212
+ c.preventDefault(), he.value = 0;
3213
+ const M = (le = (K = c.dataTransfer) == null ? void 0 : K.files) == null ? void 0 : le[0];
3214
+ M && Ae(M);
3215
3215
  }
3216
- function Oe(d) {
3217
- F(d), a("selection-change", d);
3216
+ function Ue(c) {
3217
+ F(c), a("selection-change", c);
3218
3218
  }
3219
- function Ue(d) {
3220
- return d.status !== "invalid";
3219
+ function Le(c) {
3220
+ return c.status !== "invalid";
3221
3221
  }
3222
- async function ze() {
3222
+ async function Ee() {
3223
3223
  try {
3224
- const d = await ue();
3225
- if (!d) return;
3226
- if (a("processed", d), d.stopped) {
3227
- const V = d.total - d.success - d.failed;
3224
+ const c = await ue();
3225
+ if (!c) return;
3226
+ if (a("processed", c), c.stopped) {
3227
+ const M = c.total - c.success - c.failed;
3228
3228
  fe.warning(
3229
- `已停止:成功 ${d.success} 行,失败 ${d.failed} 行,剩余 ${V} 行未处理(可再次「开始处理」续跑)`
3229
+ `已停止:成功 ${c.success} 行,失败 ${c.failed} 行,剩余 ${M} 行未处理(可再次「开始处理」续跑)`
3230
3230
  );
3231
- } else d.failed === 0 ? fe.success(`全部处理完成,共 ${d.success} 行`) : fe.warning(`处理完成:成功 ${d.success} 行,失败 ${d.failed} 行`);
3232
- } catch (d) {
3233
- fe.error(d instanceof Error ? d.message : String(d));
3231
+ } else c.failed === 0 ? fe.success(`全部处理完成,共 ${c.success} 行`) : fe.warning(`处理完成:成功 ${c.success} 行,失败 ${c.failed} 行`);
3232
+ } catch (c) {
3233
+ fe.error(c instanceof Error ? c.message : String(c));
3234
3234
  }
3235
3235
  }
3236
- function Me(d) {
3237
- return !x.value && (d.status === "invalid" || d.status === "failed");
3236
+ function Pe(c) {
3237
+ return !x.value && (c.status === "invalid" || c.status === "failed");
3238
3238
  }
3239
- const Pe = I(!1), ye = I(null);
3240
- function Ge(d) {
3241
- Me(d) && (ye.value = d, Pe.value = !0);
3239
+ const ze = Y(!1), ge = Y(null);
3240
+ function We(c) {
3241
+ Pe(c) && (ge.value = c, ze.value = !0);
3242
3242
  }
3243
- async function Le(d) {
3244
- var V;
3245
- a("row-update", d), await He(), (V = $.value) == null || V.toggleRowSelection(d, !0), fe.success(`第 ${d.rowNumber} 行已修正,可重新处理`);
3243
+ async function He(c) {
3244
+ var M;
3245
+ a("row-update", c), await Ke(), (M = w.value) == null || M.toggleRowSelection(c, !0), fe.success(`第 ${c.rowNumber} 行已修正,可重新处理`);
3246
3246
  }
3247
- async function We(d) {
3248
- if (Me(d)) {
3247
+ async function Je(c) {
3248
+ if (Pe(c)) {
3249
3249
  try {
3250
- await vt.confirm(
3251
- `确定删除第 ${d.rowNumber} 行吗?删除后不可恢复。`,
3250
+ await kt.confirm(
3251
+ `确定删除第 ${c.rowNumber} 行吗?删除后不可恢复。`,
3252
3252
  "删除数据行",
3253
3253
  { type: "warning", confirmButtonText: "删除", cancelButtonText: "取消" }
3254
3254
  );
3255
3255
  } catch {
3256
3256
  return;
3257
3257
  }
3258
- E(d), a("row-remove", d), fe.success(`已删除第 ${d.rowNumber} 行`);
3258
+ E(c), a("row-remove", c), fe.success(`已删除第 ${c.rowNumber} 行`);
3259
3259
  }
3260
3260
  }
3261
- return f({ openFilePicker: pe, startProcessing: ze, stopProcessing: ce, clear: oe }), (d, V) => {
3262
- const O = w("el-button"), te = w("el-progress"), s = w("el-table-column"), W = w("el-tag"), re = w("el-table"), ke = ut("loading");
3263
- return n(), v("div", {
3261
+ return m({ openFilePicker: pe, startProcessing: Ee, stopProcessing: de, clear: ee }), (c, M) => {
3262
+ const K = C("el-button"), le = C("el-progress"), i = C("el-table-column"), J = C("el-tag"), re = C("el-table"), _e = pt("loading");
3263
+ return n(), g("div", {
3264
3264
  class: "yk-import-excel",
3265
- onDragenter: Ne,
3265
+ onDragenter: qe,
3266
3266
  onDragover: De,
3267
- onDragleave: Ae,
3268
- onDrop: qe
3267
+ onDragleave: Re,
3268
+ onDrop: Oe
3269
3269
  }, [
3270
- p("input", {
3270
+ y("input", {
3271
3271
  ref_key: "fileInputRef",
3272
- ref: g,
3272
+ ref: d,
3273
3273
  class: "yk-import-excel__file",
3274
3274
  type: "file",
3275
3275
  accept: l.accept,
3276
- onChange: Ve
3277
- }, null, 40, Vn),
3278
- p("div", Fn, [
3279
- c(O, {
3276
+ onChange: Fe
3277
+ }, null, 40, Dn),
3278
+ y("div", En, [
3279
+ p(K, {
3280
3280
  type: "primary",
3281
- loading: i(y),
3281
+ loading: u(f),
3282
3282
  onClick: pe
3283
3283
  }, {
3284
- default: o(() => [...V[1] || (V[1] = [
3285
- C(" 选择 Excel 文件 ", -1)
3284
+ default: o(() => [...M[1] || (M[1] = [
3285
+ V(" 选择 Excel 文件 ", -1)
3286
3286
  ])]),
3287
3287
  _: 1
3288
3288
  }, 8, ["loading"]),
3289
- c(O, {
3289
+ p(K, {
3290
3290
  type: "success",
3291
- loading: i(x),
3292
- disabled: i(r) === 0,
3293
- onClick: ze
3291
+ loading: u(x),
3292
+ disabled: u(s) === 0,
3293
+ onClick: Ee
3294
3294
  }, {
3295
3295
  default: o(() => [
3296
- C(" 开始处理" + P(i(r) > 0 ? `(${i(r)} 行)` : ""), 1)
3296
+ V(" 开始处理" + z(u(s) > 0 ? `(${u(s)} 行)` : ""), 1)
3297
3297
  ]),
3298
3298
  _: 1
3299
3299
  }, 8, ["loading", "disabled"]),
3300
- i(x) ? (n(), h(O, {
3300
+ u(x) ? (n(), h(K, {
3301
3301
  key: 0,
3302
3302
  type: "danger",
3303
- disabled: i(S),
3304
- onClick: i(ce)
3303
+ disabled: u(S),
3304
+ onClick: u(de)
3305
3305
  }, {
3306
3306
  default: o(() => [
3307
- C(P(i(S) ? "正在停止…" : "停止"), 1)
3307
+ V(z(u(S) ? "正在停止…" : "停止"), 1)
3308
3308
  ]),
3309
3309
  _: 1
3310
- }, 8, ["disabled", "onClick"])) : M("", !0),
3311
- c(O, {
3312
- disabled: !i(_) || i(x),
3313
- onClick: i(oe)
3310
+ }, 8, ["disabled", "onClick"])) : R("", !0),
3311
+ p(K, {
3312
+ disabled: !u(_) || u(x),
3313
+ onClick: u(ee)
3314
3314
  }, {
3315
- default: o(() => [...V[2] || (V[2] = [
3316
- C("清空", -1)
3315
+ default: o(() => [...M[2] || (M[2] = [
3316
+ V("清空", -1)
3317
3317
  ])]),
3318
3318
  _: 1
3319
3319
  }, 8, ["disabled", "onClick"]),
3320
- i(u) ? (n(), v("span", {
3320
+ u(r) ? (n(), g("span", {
3321
3321
  key: 1,
3322
3322
  class: "yk-import-excel__file-name",
3323
- title: i(u)
3323
+ title: u(r)
3324
3324
  }, [
3325
- C(" 📄 " + P(i(u)), 1),
3326
- i(A) ? (n(), v(N, { key: 0 }, [
3327
- C("(工作表:" + P(i(A)) + ")", 1)
3328
- ], 64)) : M("", !0)
3329
- ], 8, Rn)) : M("", !0),
3330
- i(_) ? (n(), v("div", An, [
3331
- p("span", Mn, "共 " + P(i(k).length) + " 行", 1),
3332
- p("span", Pn, "已选 " + P(i(j)), 1),
3333
- p("span", Bn, "校验失败 " + P(i(q)), 1)
3334
- ])) : M("", !0)
3325
+ V(" 📄 " + z(u(r)), 1),
3326
+ u($) ? (n(), g(L, { key: 0 }, [
3327
+ V("(工作表:" + z(u($)) + ")", 1)
3328
+ ], 64)) : R("", !0)
3329
+ ], 8, In)) : R("", !0),
3330
+ u(_) ? (n(), g("div", Tn, [
3331
+ y("span", Qn, "共 " + z(u(k).length) + " 行", 1),
3332
+ y("span", Yn, "已选 " + z(u(G)), 1),
3333
+ y("span", Nn, "校验失败 " + z(u(N)), 1)
3334
+ ])) : R("", !0)
3335
3335
  ]),
3336
- i(x) ? (n(), v("div", Dn, [
3337
- c(te, {
3338
- percentage: K.value,
3336
+ u(x) ? (n(), g("div", qn, [
3337
+ p(le, {
3338
+ percentage: W.value,
3339
3339
  "stroke-width": 14,
3340
3340
  "text-inside": "",
3341
- format: ne,
3341
+ format: oe,
3342
3342
  class: "yk-import-excel__progress-bar"
3343
3343
  }, null, 8, ["percentage"]),
3344
- p("span", zn, [
3345
- C(" 成功 " + P(i(R)), 1),
3346
- p("span", Qn, " / 失败 " + P(i(b)), 1)
3344
+ y("span", On, [
3345
+ V(" 成功 " + z(u(A)), 1),
3346
+ y("span", Un, " / 失败 " + z(u(b)), 1)
3347
3347
  ]),
3348
- p("span", En, P(ge.value), 1)
3349
- ])) : M("", !0),
3350
- Je((n(), v("div", Tn, [
3351
- i(_) ? (n(), h(re, {
3348
+ y("span", Ln, z(ke.value), 1)
3349
+ ])) : R("", !0),
3350
+ Xe((n(), g("div", Hn, [
3351
+ u(_) ? (n(), h(re, {
3352
3352
  key: 0,
3353
3353
  ref_key: "tableRef",
3354
- ref: $,
3355
- data: i(k),
3354
+ ref: w,
3355
+ data: u(k),
3356
3356
  height: "100%",
3357
3357
  "row-key": "rowNumber",
3358
3358
  border: "",
3359
3359
  stripe: "",
3360
- onSelectionChange: Oe
3360
+ onSelectionChange: Ue
3361
3361
  }, {
3362
3362
  default: o(() => [
3363
- c(s, {
3363
+ p(i, {
3364
3364
  type: "selection",
3365
3365
  width: "44",
3366
3366
  fixed: "left",
3367
- selectable: Ue
3367
+ selectable: Le
3368
3368
  }),
3369
- c(s, {
3369
+ p(i, {
3370
3370
  label: "行号",
3371
3371
  width: "70",
3372
3372
  align: "center",
3373
3373
  fixed: "left"
3374
3374
  }, {
3375
- default: o(({ row: J, $index: _e }) => [
3376
- p("span", {
3377
- title: `Excel 第 ${J.rowNumber} 行`
3378
- }, P(_e + 1), 9, In)
3375
+ default: o(({ row: X, $index: be }) => [
3376
+ y("span", {
3377
+ title: `Excel 第 ${X.rowNumber} 行`
3378
+ }, z(be + 1), 9, Kn)
3379
3379
  ]),
3380
3380
  _: 1
3381
3381
  }),
3382
- (n(!0), v(N, null, Z(l.columns, (J) => (n(), h(s, {
3383
- key: J.name,
3384
- label: J.name,
3382
+ (n(!0), g(L, null, te(l.columns, (X) => (n(), h(i, {
3383
+ key: X.name,
3384
+ label: X.name,
3385
3385
  "min-width": "120",
3386
3386
  "show-overflow-tooltip": ""
3387
3387
  }, {
3388
- default: o(({ row: _e }) => [
3389
- C(P(i(Ct)(_e.data[J.name])), 1)
3388
+ default: o(({ row: be }) => [
3389
+ V(z(u(Vt)(be.data[X.name])), 1)
3390
3390
  ]),
3391
3391
  _: 2
3392
3392
  }, 1032, ["label"]))), 128)),
3393
- c(s, {
3393
+ p(i, {
3394
3394
  label: "状态",
3395
3395
  width: "200",
3396
3396
  fixed: "right",
3397
3397
  "class-name": "yk-import-excel__status-cell",
3398
- filters: de.value,
3398
+ filters: se.value,
3399
3399
  "filter-method": D,
3400
3400
  "filter-multiple": !1,
3401
3401
  "filter-placement": "bottom-end"
3402
3402
  }, {
3403
- default: o(({ row: J }) => [
3404
- c(W, {
3405
- type: G[J.status].type,
3403
+ default: o(({ row: X }) => [
3404
+ p(J, {
3405
+ type: j[X.status].type,
3406
3406
  size: "small",
3407
3407
  "disable-transitions": ""
3408
3408
  }, {
3409
3409
  default: o(() => [
3410
- J.status === "processing" ? (n(), v("span", Yn)) : M("", !0),
3411
- C(" " + P(G[J.status].label), 1)
3410
+ X.status === "processing" ? (n(), g("span", jn)) : R("", !0),
3411
+ V(" " + z(j[X.status].label), 1)
3412
3412
  ]),
3413
3413
  _: 2
3414
3414
  }, 1032, ["type"]),
3415
- J.status === "invalid" ? (n(), v("div", Nn, P(J.errors.join(";")), 1)) : J.message ? (n(), v("div", qn, P(J.message), 1)) : M("", !0)
3415
+ X.status === "invalid" ? (n(), g("div", Gn, z(X.errors.join(";")), 1)) : X.message ? (n(), g("div", Wn, z(X.message), 1)) : R("", !0)
3416
3416
  ]),
3417
3417
  _: 1
3418
3418
  }, 8, ["filters"]),
3419
- c(s, {
3419
+ p(i, {
3420
3420
  label: "操作",
3421
3421
  width: "110",
3422
3422
  fixed: "right",
3423
3423
  align: "center"
3424
3424
  }, {
3425
- default: o(({ row: J }) => [
3426
- Me(J) ? (n(), v(N, { key: 0 }, [
3427
- c(O, {
3425
+ default: o(({ row: X }) => [
3426
+ Pe(X) ? (n(), g(L, { key: 0 }, [
3427
+ p(K, {
3428
3428
  link: "",
3429
3429
  type: "primary",
3430
3430
  size: "small",
3431
- onClick: (_e) => Ge(J)
3431
+ onClick: (be) => We(X)
3432
3432
  }, {
3433
- default: o(() => [...V[3] || (V[3] = [
3434
- p("svg", {
3433
+ default: o(() => [...M[3] || (M[3] = [
3434
+ y("svg", {
3435
3435
  class: "yk-import-excel__action-icon",
3436
3436
  viewBox: "0 0 24 24",
3437
3437
  fill: "none",
@@ -3441,21 +3441,21 @@ const Sn = /* @__PURE__ */ ee({
3441
3441
  "stroke-linejoin": "round",
3442
3442
  "aria-hidden": "true"
3443
3443
  }, [
3444
- p("path", { d: "M12 20h9" }),
3445
- p("path", { d: "M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z" })
3444
+ y("path", { d: "M12 20h9" }),
3445
+ y("path", { d: "M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z" })
3446
3446
  ], -1),
3447
- C(" 编辑 ", -1)
3447
+ V(" 编辑 ", -1)
3448
3448
  ])]),
3449
3449
  _: 1
3450
3450
  }, 8, ["onClick"]),
3451
- c(O, {
3451
+ p(K, {
3452
3452
  link: "",
3453
3453
  type: "danger",
3454
3454
  size: "small",
3455
- onClick: (_e) => We(J)
3455
+ onClick: (be) => Je(X)
3456
3456
  }, {
3457
- default: o(() => [...V[4] || (V[4] = [
3458
- p("svg", {
3457
+ default: o(() => [...M[4] || (M[4] = [
3458
+ y("svg", {
3459
3459
  class: "yk-import-excel__action-icon",
3460
3460
  viewBox: "0 0 24 24",
3461
3461
  fill: "none",
@@ -3465,81 +3465,311 @@ const Sn = /* @__PURE__ */ ee({
3465
3465
  "stroke-linejoin": "round",
3466
3466
  "aria-hidden": "true"
3467
3467
  }, [
3468
- p("polyline", { points: "3 6 5 6 21 6" }),
3469
- p("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }),
3470
- p("line", {
3468
+ y("polyline", { points: "3 6 5 6 21 6" }),
3469
+ y("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }),
3470
+ y("line", {
3471
3471
  x1: "10",
3472
3472
  y1: "11",
3473
3473
  x2: "10",
3474
3474
  y2: "17"
3475
3475
  }),
3476
- p("line", {
3476
+ y("line", {
3477
3477
  x1: "14",
3478
3478
  y1: "11",
3479
3479
  x2: "14",
3480
3480
  y2: "17"
3481
3481
  })
3482
3482
  ], -1),
3483
- C(" 删除 ", -1)
3483
+ V(" 删除 ", -1)
3484
3484
  ])]),
3485
3485
  _: 1
3486
3486
  }, 8, ["onClick"])
3487
- ], 64)) : (n(), v("span", On, "—"))
3487
+ ], 64)) : (n(), g("span", Jn, "—"))
3488
3488
  ]),
3489
3489
  _: 1
3490
3490
  })
3491
3491
  ]),
3492
3492
  _: 1
3493
- }, 8, ["data"])) : (n(), v("div", {
3493
+ }, 8, ["data"])) : (n(), g("div", {
3494
3494
  key: 1,
3495
3495
  class: "yk-import-excel__empty",
3496
3496
  onClick: pe
3497
3497
  }, [
3498
- V[5] || (V[5] = lt('<svg class="yk-import-excel__empty-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-b5999744><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" data-v-b5999744></path><polyline points="14 2 14 8 20 8" data-v-b5999744></polyline><path d="M12 18v-6" data-v-b5999744></path><polyline points="9.5 14.5 12 12l2.5 2.5" data-v-b5999744></polyline></svg><p class="yk-import-excel__empty-title" data-v-b5999744>点击选择 Excel 文件,或将文件拖拽到此处</p>', 2)),
3499
- p("p", Un, "支持 " + P(l.accept) + " 格式,首行需为表头", 1)
3498
+ M[5] || (M[5] = nt('<svg class="yk-import-excel__empty-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-2d035039><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" data-v-2d035039></path><polyline points="14 2 14 8 20 8" data-v-2d035039></polyline><path d="M12 18v-6" data-v-2d035039></path><polyline points="9.5 14.5 12 12l2.5 2.5" data-v-2d035039></polyline></svg><p class="yk-import-excel__empty-title" data-v-2d035039>点击选择 Excel 文件,或将文件拖拽到此处</p>', 2)),
3499
+ y("p", Xn, "支持 " + z(l.accept) + " 格式,首行需为表头", 1)
3500
3500
  ]))
3501
3501
  ])), [
3502
- [ke, i(y)]
3502
+ [_e, u(f)]
3503
3503
  ]),
3504
- he.value ? (n(), v("div", Ln, [...V[6] || (V[6] = [
3505
- lt('<div class="yk-import-excel__drop-tip" data-v-b5999744><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-b5999744><path d="M12 15V3" data-v-b5999744></path><polyline points="7 8 12 3 17 8" data-v-b5999744></polyline><path d="M3 15v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4" data-v-b5999744></path></svg><span data-v-b5999744>松开鼠标,加载 Excel 文件</span></div>', 1)
3506
- ])])) : M("", !0),
3507
- c($n, {
3508
- visible: Pe.value,
3509
- "onUpdate:visible": V[0] || (V[0] = (J) => Pe.value = J),
3510
- row: ye.value,
3504
+ we.value ? (n(), g("div", Zn, [...M[6] || (M[6] = [
3505
+ nt('<div class="yk-import-excel__drop-tip" data-v-2d035039><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-2d035039><path d="M12 15V3" data-v-2d035039></path><polyline points="7 8 12 3 17 8" data-v-2d035039></polyline><path d="M3 15v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4" data-v-2d035039></path></svg><span data-v-2d035039>松开鼠标,加载 Excel 文件</span></div>', 1)
3506
+ ])])) : R("", !0),
3507
+ p(Bn, {
3508
+ visible: ze.value,
3509
+ "onUpdate:visible": M[0] || (M[0] = (X) => ze.value = X),
3510
+ row: ge.value,
3511
3511
  columns: l.columns,
3512
- saver: i(Y),
3513
- onSaved: Le
3512
+ saver: u(q),
3513
+ onSaved: He
3514
3514
  }, null, 8, ["visible", "row", "columns", "saver"])
3515
3515
  ], 32);
3516
3516
  };
3517
3517
  }
3518
- }), Kn = /* @__PURE__ */ ae(Hn, [["__scopeId", "data-v-b5999744"]]), Zn = {
3518
+ }), to = /* @__PURE__ */ ae(eo, [["__scopeId", "data-v-2d035039"]]), ut = "ys-modal-style";
3519
+ function lo() {
3520
+ if (document.getElementById(ut)) return;
3521
+ const e = document.createElement("style");
3522
+ e.id = ut, e.textContent = [
3523
+ // 固定高度:height 由内联 CSS 变量 --ys-modal-height 传入(每个弹窗可不同)。
3524
+ // .el-dialog 设为 flex column,body 区 flex:1 + overflow:auto,
3525
+ // 内容超出时在弹窗内纵向滚动,不会撑大弹窗。
3526
+ ".ys-modal-dialog--fixed-height{height:var(--ys-modal-height);display:flex;flex-direction:column}",
3527
+ ".ys-modal-dialog--fixed-height .el-dialog__body{flex:1;min-height:0;overflow:auto}",
3528
+ // 注意:不要给 .el-dialog__header 加 position:relative——
3529
+ // EP 默认 header 是 static,关闭按钮 .el-dialog__headerbtn 相对 .el-dialog(relative)
3530
+ // 定位;一旦 header 变 relative,关闭按钮包含块改变(多出 header padding 偏移),
3531
+ // 导致「有最大化按钮时关闭按钮位置与无最大化时不一致」。
3532
+ // 最大化按钮同样 absolute,会自动跳过 static 的 header、以 .el-dialog 为包含块,
3533
+ // 与关闭按钮处于完全相同的坐标系。
3534
+ // 最大化 height 用 !important 覆盖固定高度模式(最大化优先铺满视口)
3535
+ ".ys-modal-dialog--maximized{--el-dialog-margin-top:0!important;width:100%!important;max-width:100%!important;margin-bottom:0!important;height:100vh!important;display:flex;flex-direction:column}",
3536
+ ".ys-modal-dialog--maximized .el-dialog__body{flex:1;min-height:0;overflow:auto}",
3537
+ // 与 EP 关闭按钮同一包含块(.el-dialog)、同一基线(top:0/right:0):
3538
+ // 关闭热区 48x48,最大化按钮右移 48+4=52px 紧贴其左侧
3539
+ ".ys-modal-header__maximize{position:absolute;right:52px;top:0;width:48px;height:48px;padding:0;border:none;background:transparent;cursor:pointer;color:var(--el-color-info);display:inline-flex;align-items:center;justify-content:center;border-radius:4px}",
3540
+ ".ys-modal-header__maximize:hover{background:var(--el-fill-color-light);color:var(--el-color-primary)}",
3541
+ // EP 关闭图标在其 48px 热区中视觉中心偏上 2px(受其 line-height 影响),
3542
+ // 补偿使两个图标的视觉中心完全水平对齐
3543
+ ".ys-modal-header__maximize svg{display:block;margin-top:-2px}"
3544
+ ].join(""), document.head.appendChild(e);
3545
+ }
3546
+ function no() {
3547
+ return ye(
3548
+ "svg",
3549
+ {
3550
+ viewBox: "0 0 24 24",
3551
+ width: 16,
3552
+ height: 16,
3553
+ fill: "none",
3554
+ stroke: "currentColor",
3555
+ "stroke-width": 2,
3556
+ "stroke-linecap": "round",
3557
+ "stroke-linejoin": "round"
3558
+ },
3559
+ [ye("rect", { x: 4, y: 4, width: 16, height: 16, rx: 2 })]
3560
+ );
3561
+ }
3562
+ function oo() {
3563
+ return ye(
3564
+ "svg",
3565
+ {
3566
+ viewBox: "0 0 24 24",
3567
+ width: 16,
3568
+ height: 16,
3569
+ fill: "none",
3570
+ stroke: "currentColor",
3571
+ "stroke-width": 2,
3572
+ "stroke-linecap": "round",
3573
+ "stroke-linejoin": "round"
3574
+ },
3575
+ [
3576
+ ye("rect", { x: 8, y: 8, width: 12, height: 12, rx: 2 }),
3577
+ ye("path", { d: "M4 16V6a2 2 0 0 1 2-2h10" })
3578
+ ]
3579
+ );
3580
+ }
3581
+ function ao(e) {
3582
+ var E;
3583
+ const {
3584
+ title: m = "",
3585
+ width: t = "500px",
3586
+ height: l,
3587
+ component: a,
3588
+ props: k,
3589
+ actions: r,
3590
+ onCancel: $,
3591
+ onClosed: f,
3592
+ closeOnClickModal: x = !1,
3593
+ closeOnPressEscape: S = !1,
3594
+ maximizable: P = !1,
3595
+ defaultMaximized: H = !1,
3596
+ appContext: A
3597
+ } = e;
3598
+ (P || l != null) && lo();
3599
+ const b = l == null ? void 0 : typeof l == "number" ? `${l}px` : l, _ = document.createElement("div");
3600
+ document.body.appendChild(_);
3601
+ let N = null, T = !1, U;
3602
+ const G = () => {
3603
+ T || (T = !0, ot(null, _), _.remove());
3604
+ }, s = {
3605
+ close: () => U == null ? void 0 : U.close(),
3606
+ toggleMaximize: () => U == null ? void 0 : U.toggleMaximize(),
3607
+ isMaximized: () => (U == null ? void 0 : U.isMaximized()) ?? !1,
3608
+ getContentInstance: () => N
3609
+ }, v = Z({
3610
+ name: "YsModalHost",
3611
+ setup(ue, { expose: de }) {
3612
+ const ee = Y(!0), w = Y(-1), d = Y(P && H), j = () => {
3613
+ P && (d.value = !d.value);
3614
+ }, se = () => {
3615
+ ee.value = !1;
3616
+ }, D = () => {
3617
+ w.value >= 0 || ($ == null || $(), ee.value = !1);
3618
+ }, I = async (B, O) => {
3619
+ if (!(w.value >= 0)) {
3620
+ w.value = O;
3621
+ try {
3622
+ await B.execute(s, N);
3623
+ } finally {
3624
+ w.value = -1;
3625
+ }
3626
+ }
3627
+ };
3628
+ return de({ close: se, toggleMaximize: j, isMaximized: () => d.value }), () => ye(
3629
+ Jt,
3630
+ {
3631
+ // Element Plus 2.x 显隐规范:modelValue + update:modelValue
3632
+ modelValue: ee.value,
3633
+ "onUpdate:modelValue": (B) => {
3634
+ B || D();
3635
+ },
3636
+ title: P ? void 0 : m,
3637
+ width: t,
3638
+ // 最大化时贴顶(配合样式中 --el-dialog-margin-top:0)
3639
+ top: d.value ? "0vh" : void 0,
3640
+ // 最大化 class 优先(height:100vh!important 覆盖固定高度);
3641
+ // 否则若设置了 height 则用固定高度 class + CSS 变量
3642
+ class: d.value ? "ys-modal-dialog--maximized" : b ? "ys-modal-dialog--fixed-height" : void 0,
3643
+ // 固定高度值通过 CSS 变量传递(每个弹窗可不同)
3644
+ style: b && !d.value ? { "--ys-modal-height": b } : void 0,
3645
+ closeOnClickModal: x,
3646
+ closeOnPressEscape: S,
3647
+ // 动作执行中隐藏右上角 ✕,与底部其余按钮禁用保持一致
3648
+ showClose: w.value < 0,
3649
+ destroyOnClose: !0,
3650
+ onClosed: () => {
3651
+ f == null || f(), G();
3652
+ }
3653
+ },
3654
+ {
3655
+ // maximizable 时接管 header 插槽:标题 span + 最大化按钮。
3656
+ // 不额外包裹 div——span 直接作为 header 子元素,与 EP 默认
3657
+ // 标题结构一致,避免 block 包裹改变标题的行盒/换行行为;
3658
+ // 按钮 absolute 脱离文档流,以 .el-dialog 为包含块定位。
3659
+ // EP 的 ✕ 关闭按钮渲染在插槽内容之外,自动保留且定位不受影响。
3660
+ header: P ? () => [
3661
+ ye("span", { class: "el-dialog__title" }, m),
3662
+ ye(
3663
+ "button",
3664
+ {
3665
+ type: "button",
3666
+ class: "ys-modal-header__maximize",
3667
+ title: d.value ? "还原" : "最大化",
3668
+ "aria-label": d.value ? "还原" : "最大化",
3669
+ onClick: j
3670
+ },
3671
+ d.value ? oo() : no()
3672
+ )
3673
+ ] : void 0,
3674
+ default: () => ye(a, {
3675
+ ...k ?? {},
3676
+ // 注入关闭监听器:内容组件 defineEmits(["close"]) 后
3677
+ // emit("close") 即可关闭;无需在业务 props 里声明。
3678
+ // 注意 onClose 在 props 展开之后,业务 props 里的 onClose
3679
+ // 会被注入值覆盖(关闭行为不交给业务侧)
3680
+ onClose: se,
3681
+ ref: (B) => {
3682
+ N = B;
3683
+ }
3684
+ }),
3685
+ footer: () => r != null && r.length ? r.map(
3686
+ (B, O) => ye(
3687
+ Xt,
3688
+ {
3689
+ key: B.name,
3690
+ // 与 commandBar 同构:'default' 归一化为 undefined
3691
+ type: B.type === "default" ? void 0 : B.type,
3692
+ title: B.desc,
3693
+ // 执行中:当前动作 loading,其余动作禁用
3694
+ disabled: w.value >= 0 && w.value !== O,
3695
+ loading: w.value === O,
3696
+ onClick: () => I(B, O)
3697
+ },
3698
+ {
3699
+ default: () => [
3700
+ // 与模板 <component :is> 行为对齐:VNode 原样嵌入、组件 h() 渲染;
3701
+ // 外包 span 提供与 commandBar 图标一致的间距(teleport 内容无法用 scoped 样式命中)
3702
+ B.icon ? ye(
3703
+ "span",
3704
+ {
3705
+ style: "margin-right:4px;display:inline-flex;align-items:center;vertical-align:-2px"
3706
+ },
3707
+ [zt(B.icon) ? B.icon : ye(B.icon)]
3708
+ ) : null,
3709
+ B.desc
3710
+ ]
3711
+ }
3712
+ )
3713
+ ) : null
3714
+ }
3715
+ );
3716
+ }
3717
+ }), F = p(v), q = A ?? Gt();
3718
+ return q || console.warn(
3719
+ "[openModal] 未检测到 AppContext:弹窗内的全局组件(如 el-form)与 inject 将不可用。请在应用入口 app.use(YsCrudElementPlus),或调用 openModal 时传入 appContext(getCurrentInstance()?.appContext)。"
3720
+ ), F.appContext = q, ot(F, _), U = (E = F.component) == null ? void 0 : E.exposed, s;
3721
+ }
3722
+ function po(e) {
3723
+ const {
3724
+ confirmText: m = "确定",
3725
+ cancelText: t = "取消",
3726
+ confirmType: l = "primary",
3727
+ onConfirm: a,
3728
+ ...k
3729
+ } = e;
3730
+ return ao({ ...k, actions: [
3731
+ { name: "cancel", desc: t, execute: ($) => $.close() },
3732
+ {
3733
+ name: "confirm",
3734
+ desc: m,
3735
+ type: l,
3736
+ execute: async ($, f) => {
3737
+ if (!a) {
3738
+ $.close();
3739
+ return;
3740
+ }
3741
+ await a($, f) !== !1 && $.close();
3742
+ }
3743
+ }
3744
+ ] });
3745
+ }
3746
+ const mo = {
3519
3747
  install(e) {
3520
- e.component("YsTable", yt), e.component("YsTableActionMenuButton", gt), e.component("YsCommandBar", kt), e.component("YsMainPanel", Kl), e.component("YsFilterPanel", xt), e.component("YsTextFilterItem", kn), e.component("YsDateFilterItem", _n), e.component("YsDateRangeFilterItem", bn), e.component("YsEnumFilterItem", hn), e.component("YsFilterItemLayout", Ie), e.component("YsAdvancedFilterPanel", wt), e.component("YsAdvancedValueEditor", _t), e.component("YsAdvancedConditionGroup", ht), e.component("YsTablePage", Cn), e.component("YsImportExcel", Kn);
3748
+ Wt(e._context), e.component("YsTable", _t), e.component("YsTableActionMenuButton", bt), e.component("YsCommandBar", ht), e.component("YsMainPanel", tn), e.component("YsFilterPanel", $t), e.component("YsTextFilterItem", $n), e.component("YsDateFilterItem", Vn), e.component("YsDateRangeFilterItem", Fn), e.component("YsEnumFilterItem", Mn), e.component("YsFilterItemLayout", Ye), e.component("YsAdvancedFilterPanel", St), e.component("YsAdvancedValueEditor", wt), e.component("YsAdvancedConditionGroup", Ct), e.component("YsTablePage", Pn), e.component("YsImportExcel", to);
3521
3749
  }
3522
3750
  };
3523
3751
  export {
3524
- ht as YsAdvancedConditionGroup,
3525
- wt as YsAdvancedFilterPanel,
3526
- _t as YsAdvancedValueEditor,
3527
- kt as YsCommandBar,
3528
- _n as YsDateFilterItem,
3529
- bn as YsDateRangeFilterItem,
3530
- hn as YsEnumFilterItem,
3531
- Ie as YsFilterItemLayout,
3532
- xt as YsFilterPanel,
3533
- Kn as YsImportExcel,
3534
- Kl as YsMainPanel,
3535
- yt as YsTable,
3536
- gt as YsTableActionMenuButton,
3537
- Cn as YsTablePage,
3538
- kn as YsTextFilterItem,
3539
- Zn as default,
3540
- lo as fromArray,
3541
- no as fromBool,
3542
- oo as fromObjectItems,
3543
- ao as fromOptions
3752
+ Ct as YsAdvancedConditionGroup,
3753
+ St as YsAdvancedFilterPanel,
3754
+ wt as YsAdvancedValueEditor,
3755
+ ht as YsCommandBar,
3756
+ Vn as YsDateFilterItem,
3757
+ Fn as YsDateRangeFilterItem,
3758
+ Mn as YsEnumFilterItem,
3759
+ Ye as YsFilterItemLayout,
3760
+ $t as YsFilterPanel,
3761
+ to as YsImportExcel,
3762
+ tn as YsMainPanel,
3763
+ _t as YsTable,
3764
+ bt as YsTableActionMenuButton,
3765
+ Pn as YsTablePage,
3766
+ $n as YsTextFilterItem,
3767
+ mo as default,
3768
+ yo as fromArray,
3769
+ go as fromBool,
3770
+ ko as fromObjectItems,
3771
+ _o as fromOptions,
3772
+ po as openDialog,
3773
+ ao as openModal
3544
3774
  };
3545
3775
  //# sourceMappingURL=index.js.map