@jt-home/mfe-components 1.0.62 → 1.0.64

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.
Files changed (112) hide show
  1. package/dist/package/JtAttachmentPreview/index.cjs +2 -0
  2. package/dist/package/JtAttachmentPreview/index.mjs +907 -0
  3. package/dist/package/JtAttachmentPreview/style.css +1 -0
  4. package/dist/package/el-table-column-CdKtbSnU.js +9 -0
  5. package/dist/package/el-table-column-Cvm2mF29.cjs +1 -0
  6. package/dist/package/el-table-column.css +1 -0
  7. package/dist/package/globalInfo/index.cjs +4 -0
  8. package/dist/package/globalInfo/index.mjs +4039 -0
  9. package/dist/package/globalInfo/style.css +1 -0
  10. package/dist/package/index.cjs +3 -0
  11. package/dist/package/index.mjs +1679 -0
  12. package/dist/{locale → package/locale}/index.cjs +1 -1
  13. package/dist/{locale → package/locale}/index.mjs +1 -1
  14. package/dist/package/style.css +1 -0
  15. package/dist/{types → package/types}/components/JtAttachmentPreview/index.d.ts +3 -2
  16. package/dist/{types → package/types}/components/JtAttachmentPreview/types.d.ts +6 -4
  17. package/dist/{types → package/types}/components/JtButton/index.vue.d.ts +9 -3
  18. package/dist/package/types/components/JtCard/index.d.ts +1 -0
  19. package/dist/package/types/components/JtCard/index.vue.d.ts +21 -0
  20. package/dist/package/types/components/JtConfirmDialog/index.d.ts +8 -0
  21. package/dist/package/types/components/JtConfirmDialog/index.vue.d.ts +26 -0
  22. package/dist/package/types/components/JtConfirmDialog/types.d.ts +23 -0
  23. package/dist/package/types/components/JtDrawer/index.d.ts +1 -0
  24. package/dist/package/types/components/JtDrawer/index.vue.d.ts +50 -0
  25. package/dist/{types → package/types}/components/JtPageHeader/index.d.ts +1 -1
  26. package/dist/{types → package/types}/components/JtPageHeader/index.vue.d.ts +8 -3
  27. package/dist/{types → package/types}/components/JtPageHeader/types.d.ts +7 -3
  28. package/dist/package/types/components/JtTab/JtTabItem.vue.d.ts +16 -0
  29. package/dist/package/types/components/JtTab/index.d.ts +3 -0
  30. package/dist/package/types/components/JtTab/index.vue.d.ts +25 -0
  31. package/dist/package/types/components/JtTab/types.d.ts +28 -0
  32. package/dist/{types → package/types}/components/globalInfo/model/fieldUtils.d.ts +3 -19
  33. package/dist/{types → package/types}/components/globalInfo/model/slotIdentity.d.ts +1 -1
  34. package/dist/{types → package/types}/components/globalInfo/model/types.d.ts +2 -2
  35. package/dist/{types → package/types}/components/index.d.ts +6 -3
  36. package/dist/{types → package/types}/locale/types.d.ts +1 -1
  37. package/dist/package/types/main.d.ts +5 -0
  38. package/package.json +49 -25
  39. package/readme.md +713 -694
  40. package/dist/JtAttachmentPreview/index.cjs +0 -1
  41. package/dist/JtAttachmentPreview/index.mjs +0 -1120
  42. package/dist/JtAttachmentPreview/style.css +0 -1
  43. package/dist/index.cjs +0 -3
  44. package/dist/index.mjs +0 -5309
  45. package/dist/pdf-BmBuG7of.js +0 -18058
  46. package/dist/pdf-Da0bm_Ya.cjs +0 -55
  47. package/dist/pdf.worker.min-4PI-nNLo.js +0 -4
  48. package/dist/pdf.worker.min-BAJUPwg6.cjs +0 -1
  49. package/dist/style.css +0 -1
  50. package/dist/types/components/globalInfo/renderers/attachmentPreview.d.ts +0 -2
  51. package/dist/types/main.d.ts +0 -5
  52. package/dist/{types → package/types}/components/JtButton/index.d.ts +0 -0
  53. package/dist/{types → package/types}/components/form/JtFormItems.vue.d.ts +0 -0
  54. package/dist/{types → package/types}/components/form/index.d.ts +0 -0
  55. package/dist/{types → package/types}/components/form/item/JtCascader/cascaderProps.d.ts +0 -0
  56. package/dist/{types → package/types}/components/form/item/JtCascader/index.d.ts +0 -0
  57. package/dist/{types → package/types}/components/form/item/JtCascader/index.vue.d.ts +0 -0
  58. package/dist/{types → package/types}/components/form/item/JtDatePicker/index.d.ts +0 -0
  59. package/dist/{types → package/types}/components/form/item/JtDatePicker/index.vue.d.ts +0 -0
  60. package/dist/{types → package/types}/components/form/item/JtInput/index.d.ts +0 -0
  61. package/dist/{types → package/types}/components/form/item/JtInput/index.vue.d.ts +0 -0
  62. package/dist/{types → package/types}/components/form/item/JtSelect/index.d.ts +0 -0
  63. package/dist/{types → package/types}/components/form/item/JtSelect/index.vue.d.ts +0 -0
  64. package/dist/{types → package/types}/components/form/item/JtSelect/types.d.ts +0 -0
  65. package/dist/{types → package/types}/components/form/item/index.d.ts +0 -0
  66. package/dist/{types → package/types}/components/form/types.d.ts +0 -0
  67. package/dist/{types → package/types}/components/globalInfo/components/GlobalInfoGroup.vue.d.ts +0 -0
  68. package/dist/{types → package/types}/components/globalInfo/components/GlobalInfoLeftNav.vue.d.ts +0 -0
  69. package/dist/{types → package/types}/components/globalInfo/components/GlobalInfoProvider.vue.d.ts +0 -0
  70. package/dist/{types → package/types}/components/globalInfo/components/GlobalInfoSectionBlock.vue.d.ts +0 -0
  71. package/dist/{types → package/types}/components/globalInfo/components/GlobalInfoSectionOutlet.vue.d.ts +0 -0
  72. package/dist/{types → package/types}/components/globalInfo/components/GlobalInfoSections.vue.d.ts +0 -0
  73. package/dist/{types → package/types}/components/globalInfo/components/GlobalInfoSlotErrorBoundary.vue.d.ts +0 -0
  74. package/dist/{types → package/types}/components/globalInfo/controller/controllerFieldOptions.d.ts +0 -0
  75. package/dist/{types → package/types}/components/globalInfo/controller/controllerIdentity.d.ts +0 -0
  76. package/dist/{types → package/types}/components/globalInfo/controller/controllerRequests.d.ts +0 -0
  77. package/dist/{types → package/types}/components/globalInfo/controller/controllerSectionStore.d.ts +0 -0
  78. package/dist/{types → package/types}/components/globalInfo/controller/controllerStatus.d.ts +0 -0
  79. package/dist/{types → package/types}/components/globalInfo/controller/useGlobalInfoController.d.ts +0 -0
  80. package/dist/{types → package/types}/components/globalInfo/index.d.ts +0 -0
  81. package/dist/{types → package/types}/components/globalInfo/model/adapter.d.ts +0 -0
  82. package/dist/{types → package/types}/components/globalInfo/model/fieldValidation.d.ts +0 -0
  83. package/dist/{types → package/types}/components/globalInfo/model/requiredInfoSetValidation.d.ts +0 -0
  84. package/dist/{types → package/types}/components/globalInfo/model/valueListOptions.d.ts +0 -0
  85. package/dist/{types → package/types}/components/globalInfo/renderers/GlobalInfoAutoRenderer.vue.d.ts +0 -0
  86. package/dist/{types → package/types}/components/globalInfo/renderers/GlobalInfoDeleteConfirm.vue.d.ts +1 -1
  87. /package/dist/{types → package/types}/components/globalInfo/renderers/GlobalInfoFieldControl.vue.d.ts +0 -0
  88. /package/dist/{types → package/types}/components/globalInfo/renderers/GlobalInfoFieldValue.vue.d.ts +0 -0
  89. /package/dist/{types → package/types}/components/globalInfo/renderers/GlobalInfoFormRenderer.vue.d.ts +0 -0
  90. /package/dist/{types → package/types}/components/globalInfo/renderers/GlobalInfoMultiFormRenderer.vue.d.ts +0 -0
  91. /package/dist/{types → package/types}/components/globalInfo/renderers/GlobalInfoTableRenderer.vue.d.ts +0 -0
  92. /package/dist/{types → package/types}/components/globalInfo/renderers/optionPreload.d.ts +0 -0
  93. /package/dist/{types → package/types}/components/table/JtCrudTable.vue.d.ts +0 -0
  94. /package/dist/{types → package/types}/components/table/JtFilterBar.vue.d.ts +0 -0
  95. /package/dist/{types → package/types}/components/table/JtPagination.vue.d.ts +0 -0
  96. /package/dist/{types → package/types}/components/table/JtTable.vue.d.ts +0 -0
  97. /package/dist/{types → package/types}/components/table/index.d.ts +0 -0
  98. /package/dist/{types → package/types}/components/table/types.d.ts +0 -0
  99. /package/dist/{types → package/types}/components/table/useSearchDisabled.d.ts +0 -0
  100. /package/dist/{types → package/types}/locale/index.d.ts +0 -0
  101. /package/dist/{types → package/types}/locale/messages/de.d.ts +0 -0
  102. /package/dist/{types → package/types}/locale/messages/en.d.ts +0 -0
  103. /package/dist/{types → package/types}/locale/messages/es.d.ts +0 -0
  104. /package/dist/{types → package/types}/locale/messages/id.d.ts +0 -0
  105. /package/dist/{types → package/types}/locale/messages/index.d.ts +0 -0
  106. /package/dist/{types → package/types}/locale/messages/km.d.ts +0 -0
  107. /package/dist/{types → package/types}/locale/messages/pt.d.ts +0 -0
  108. /package/dist/{types → package/types}/locale/messages/th.d.ts +0 -0
  109. /package/dist/{types → package/types}/locale/messages/vi.d.ts +0 -0
  110. /package/dist/{types → package/types}/locale/messages/zh-cn.d.ts +0 -0
  111. /package/dist/{types → package/types}/locale/normalizeLocale.d.ts +0 -0
  112. /package/dist/{types → package/types}/utils/componentAttrs.d.ts +0 -0
@@ -0,0 +1,1679 @@
1
+ import './style.css';
2
+ import './el-table-column.css';
3
+ import { t as W } from "./locale/index.mjs";
4
+ import { getLocale as Wo, install as Ho, installLocale as Ko, normalizeLocale as Uo, resetLocale as qo, setLocale as No } from "./locale/index.mjs";
5
+ import { ElButton as qe, ElIcon as Ne, ElCascader as Ze, ElDatePicker as Ge, ElInput as Ye, ElSelect as Xe, ElOption as Qe, ElFormItem as et, ElForm as tt, ElTable as ot, ElTableColumn as at, ElPagination as nt, ElLoadingDirective as lt, ElDrawer as rt } from "element-plus/es";
6
+ import { _ as K } from "./el-table-column-CdKtbSnU.js";
7
+ import { defineComponent as R, useAttrs as De, computed as r, openBlock as h, createBlock as I, mergeProps as F, toHandlers as te, withCtx as C, renderSlot as B, resolveDynamicComponent as Ve, createCommentVNode as A, ref as H, watch as ce, mergeDefaults as st, withKeys as we, createElementBlock as L, Fragment as me, renderList as Y, normalizeStyle as Be, nextTick as Oe, useSlots as oe, normalizeClass as de, createVNode as Z, withModifiers as $e, unref as x, createSlots as re, createElementVNode as S, toDisplayString as J, normalizeProps as ne, guardReactiveProps as le, useModel as _e, withDirectives as it, mergeModels as Le, createTextVNode as pe, h as ze, provide as ut, onMounted as ct, onBeforeUnmount as dt, inject as pt } from "vue";
8
+ import { cascaderEmits as mt, inputEmits as Ee, selectEmits as Ie, ElMessageBox as ft } from "element-plus";
9
+ const je = 2, vt = 3;
10
+ function ht(c) {
11
+ return c.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
12
+ }
13
+ function Je(c) {
14
+ if (!c.startsWith("on") || c.length <= je)
15
+ return !1;
16
+ const t = c.charCodeAt(je);
17
+ return t < 97 || t > 122;
18
+ }
19
+ function gt(c) {
20
+ if (c.startsWith("on-"))
21
+ return c.slice(vt);
22
+ const [t, a] = c.slice(je).split(":"), i = ht(t);
23
+ return a ? `${i}:${a}` : i;
24
+ }
25
+ function Se(c, t = /* @__PURE__ */ new Set()) {
26
+ return Object.fromEntries(
27
+ Object.entries(c).filter(([a, i]) => !t.has(a) && Je(a) && typeof i == "function").map(([a, i]) => [gt(a), i])
28
+ );
29
+ }
30
+ function ke(c, t = /* @__PURE__ */ new Set()) {
31
+ return Object.fromEntries(
32
+ Object.entries(c).filter(([a]) => !t.has(a) && !Je(a))
33
+ );
34
+ }
35
+ const yt = /* @__PURE__ */ R({
36
+ name: "JtButton",
37
+ __name: "index",
38
+ props: {
39
+ disabled: { type: Boolean },
40
+ type: {},
41
+ icon: {},
42
+ nativeType: {},
43
+ loading: { type: Boolean },
44
+ loadingIcon: {},
45
+ plain: { type: Boolean },
46
+ text: { type: Boolean },
47
+ link: { type: Boolean },
48
+ bg: { type: Boolean },
49
+ autofocus: { type: Boolean },
50
+ round: { type: Boolean },
51
+ circle: { type: Boolean },
52
+ dashed: { type: Boolean },
53
+ color: {},
54
+ dark: { type: Boolean },
55
+ autoInsertSpace: { type: Boolean },
56
+ tag: {},
57
+ size: {},
58
+ gray: { type: Boolean }
59
+ },
60
+ setup(c) {
61
+ const t = c, a = De(), i = r(() => t.type === "primary"), u = r(() => t.plain === !0), l = r(() => t.size ?? "default"), s = r(() => ({
62
+ [`jt-button--size-${l.value}`]: !0,
63
+ "jt-button--type-primary": i.value,
64
+ "jt-button--plain": u.value,
65
+ "jt-button--gray": t.gray,
66
+ "jt-button--border": !0
67
+ })), m = r(() => {
68
+ const { gray: d, icon: g, size: b, ...z } = t;
69
+ return {
70
+ ...ke(a),
71
+ ...z
72
+ };
73
+ }), n = r(() => Se(a));
74
+ return (d, g) => {
75
+ const b = Ne, z = qe;
76
+ return h(), I(z, F({
77
+ class: ["jt-button", s.value]
78
+ }, m.value, te(n.value)), {
79
+ default: C(() => [
80
+ d.$slots.icon ? (h(), I(b, {
81
+ key: 0,
82
+ class: "jt-button__icon"
83
+ }, {
84
+ default: C(() => [
85
+ B(d.$slots, "icon", {}, void 0, !0)
86
+ ]),
87
+ _: 3
88
+ })) : t.icon ? (h(), I(b, {
89
+ key: 1,
90
+ class: "jt-button__icon"
91
+ }, {
92
+ default: C(() => [
93
+ (h(), I(Ve(t.icon)))
94
+ ]),
95
+ _: 1
96
+ })) : A("", !0),
97
+ B(d.$slots, "default", {}, void 0, !0)
98
+ ]),
99
+ _: 3
100
+ }, 16, ["class"]);
101
+ };
102
+ }
103
+ }), X = /* @__PURE__ */ K(yt, [["__scopeId", "data-v-c30ce771"]]), bt = {
104
+ // 默认值只补组件缺省体验,显式传入的 false、null 和空字符串仍由归一化逻辑保留。
105
+ options: () => [],
106
+ clearable: !0,
107
+ persistent: !0
108
+ };
109
+ function Me(c) {
110
+ return Object.fromEntries(
111
+ Object.entries(c).filter(([, t]) => t !== void 0)
112
+ );
113
+ }
114
+ function _t(c) {
115
+ const t = Me(c);
116
+ return t.props && (t.props = Me(
117
+ t.props
118
+ )), t;
119
+ }
120
+ const Ct = /* @__PURE__ */ R({
121
+ name: "JtCascader",
122
+ __name: "index",
123
+ props: /* @__PURE__ */ st({
124
+ size: {},
125
+ placeholder: {},
126
+ disabled: { type: Boolean },
127
+ clearable: { type: Boolean },
128
+ clearIcon: {},
129
+ filterable: { type: Boolean },
130
+ filterMethod: { type: Function },
131
+ separator: {},
132
+ showAllLevels: { type: Boolean },
133
+ collapseTags: { type: Boolean },
134
+ maxCollapseTags: {},
135
+ collapseTagsTooltip: { type: Boolean },
136
+ maxCollapseTagsTooltipHeight: {},
137
+ debounce: {},
138
+ beforeFilter: { type: Function },
139
+ placement: {},
140
+ fallbackPlacements: {},
141
+ popperClass: {},
142
+ popperStyle: { type: [Boolean, null, String, Object, Array] },
143
+ teleported: { type: Boolean },
144
+ effect: {},
145
+ tagType: {},
146
+ tagEffect: {},
147
+ validateEvent: { type: Boolean },
148
+ persistent: { type: Boolean },
149
+ showCheckedStrategy: {},
150
+ checkOnClickNode: { type: Boolean },
151
+ showPrefix: { type: Boolean },
152
+ fitInputWidth: { type: [Boolean, Number] },
153
+ modelValue: {},
154
+ props: {},
155
+ virtualScroll: { type: Boolean },
156
+ itemSize: {},
157
+ height: {},
158
+ emptyValues: {},
159
+ valueOnClear: { type: [String, Number, Boolean, Function, null] },
160
+ options: {}
161
+ }, bt),
162
+ emits: mt,
163
+ setup(c, { emit: t }) {
164
+ const a = c, i = r(() => {
165
+ const o = _t(a);
166
+ if (!o.disabled) return o;
167
+ const { placeholder: E, ...k } = o;
168
+ return k;
169
+ }), u = H(a.modelValue);
170
+ ce(
171
+ () => a.modelValue,
172
+ (o) => {
173
+ u.value = o;
174
+ },
175
+ { deep: !0 }
176
+ );
177
+ const l = t;
178
+ function s(o, ...E) {
179
+ l(o, ...E);
180
+ }
181
+ function m(o) {
182
+ u.value = o, s("update:modelValue", o);
183
+ }
184
+ function n(o) {
185
+ s("change", o);
186
+ }
187
+ function d(o) {
188
+ s("focus", o);
189
+ }
190
+ function g(o) {
191
+ s("blur", o);
192
+ }
193
+ function b() {
194
+ s("clear");
195
+ }
196
+ function z(o) {
197
+ s("visibleChange", o);
198
+ }
199
+ function V(o) {
200
+ s("expandChange", o);
201
+ }
202
+ function _(o) {
203
+ s("removeTag", o);
204
+ }
205
+ return (o, E) => {
206
+ const k = Ze;
207
+ return h(), I(k, F({ class: "jt-cascader" }, i.value, {
208
+ "model-value": u.value,
209
+ "onUpdate:modelValue": m,
210
+ onChange: n,
211
+ onFocus: d,
212
+ onBlur: g,
213
+ onClear: b,
214
+ onVisibleChange: z,
215
+ onExpandChange: V,
216
+ onRemoveTag: _
217
+ }), null, 16, ["model-value"]);
218
+ };
219
+ }
220
+ }), wt = /* @__PURE__ */ R({
221
+ name: "JtDatePicker",
222
+ __name: "index",
223
+ props: {
224
+ type: { default: "date" },
225
+ showNow: { type: Boolean },
226
+ showConfirm: { type: Boolean },
227
+ showFooter: { type: Boolean },
228
+ showWeekNumber: { type: Boolean },
229
+ ariaLabel: {},
230
+ emptyValues: {},
231
+ valueOnClear: {},
232
+ disabledDate: {},
233
+ cellClassName: {},
234
+ shortcuts: {},
235
+ arrowControl: { type: Boolean },
236
+ tabindex: {},
237
+ validateEvent: { type: Boolean },
238
+ unlinkPanels: { type: Boolean },
239
+ singlePanel: { type: Boolean },
240
+ placement: {},
241
+ fallbackPlacements: {},
242
+ disabledHours: {},
243
+ disabledMinutes: {},
244
+ disabledSeconds: {},
245
+ automaticDropdown: { type: Boolean },
246
+ id: {},
247
+ name: {},
248
+ popperClass: {},
249
+ popperStyle: {},
250
+ format: {},
251
+ valueFormat: { default: "YYYY-MM-DD" },
252
+ dateFormat: {},
253
+ timeFormat: {},
254
+ clearable: { type: Boolean, default: !0 },
255
+ clearIcon: {},
256
+ editable: { type: Boolean },
257
+ saveOnBlur: { type: Boolean },
258
+ prefixIcon: {},
259
+ size: {},
260
+ readonly: { type: Boolean },
261
+ disabled: { type: Boolean },
262
+ placeholder: {},
263
+ popperOptions: {},
264
+ modelValue: {},
265
+ rangeSeparator: {},
266
+ startPlaceholder: {},
267
+ endPlaceholder: {},
268
+ defaultValue: {},
269
+ defaultTime: {},
270
+ isRange: { type: Boolean },
271
+ preservePlaceholderWhenDisabled: { type: Boolean }
272
+ },
273
+ setup(c) {
274
+ const t = c, a = r(() => {
275
+ const { preservePlaceholderWhenDisabled: u, ...l } = t;
276
+ if (t.disabled && !u) {
277
+ const { placeholder: s, startPlaceholder: m, endPlaceholder: n, ...d } = l;
278
+ return d;
279
+ }
280
+ return {
281
+ ...l,
282
+ startPlaceholder: t.startPlaceholder ?? (i(t.type) ? W("common.开始日期") : void 0),
283
+ endPlaceholder: t.endPlaceholder ?? (i(t.type) ? W("common.结束日期") : void 0)
284
+ };
285
+ });
286
+ function i(u) {
287
+ return u?.includes("range") ?? !1;
288
+ }
289
+ return (u, l) => {
290
+ const s = Ge;
291
+ return h(), I(s, F({ class: "jt-date-picker" }, a.value, {
292
+ "onUpdate:modelValue": l[0] || (l[0] = (m) => u.$emit("update:modelValue", m))
293
+ }), null, 16);
294
+ };
295
+ }
296
+ }), Bt = /* @__PURE__ */ K(wt, [["__scopeId", "data-v-34482973"]]), $t = /* @__PURE__ */ R({
297
+ name: "JtInput",
298
+ __name: "index",
299
+ props: {
300
+ id: {},
301
+ size: {},
302
+ disabled: { type: Boolean },
303
+ modelValue: {},
304
+ modelModifiers: {},
305
+ maxlength: {},
306
+ minlength: {},
307
+ type: {},
308
+ resize: {},
309
+ autosize: { type: [Object, Boolean] },
310
+ autocomplete: {},
311
+ formatter: {},
312
+ parser: {},
313
+ placeholder: {},
314
+ form: {},
315
+ readonly: { type: Boolean },
316
+ clearable: { type: Boolean, default: !0 },
317
+ clearIcon: {},
318
+ showPassword: { type: Boolean },
319
+ showWordLimit: { type: Boolean },
320
+ wordLimitPosition: {},
321
+ suffixIcon: {},
322
+ prefixIcon: {},
323
+ containerRole: {},
324
+ tabindex: {},
325
+ validateEvent: { type: Boolean },
326
+ inputStyle: { type: [Boolean, null, String, Object, Array] },
327
+ autofocus: { type: Boolean },
328
+ rows: {},
329
+ ariaLabel: {},
330
+ inputmode: {},
331
+ name: {},
332
+ countGraphemes: {},
333
+ preservePlaceholderWhenDisabled: { type: Boolean }
334
+ },
335
+ emits: {
336
+ ...Ee,
337
+ enter: () => !0
338
+ },
339
+ setup(c, { emit: t }) {
340
+ const a = c, i = r(() => {
341
+ const { preservePlaceholderWhenDisabled: s, placeholder: m, ...n } = a, d = {
342
+ ...n,
343
+ // 未显式配置 placeholder 时,每次渲染按当前语言重新读取默认文案。
344
+ placeholder: m ?? W("common.请输入")
345
+ };
346
+ return !a.disabled || s ? d : Object.fromEntries(
347
+ Object.entries(d).filter(([g]) => g !== "placeholder")
348
+ );
349
+ }), u = t, l = r(() => Object.fromEntries(
350
+ Object.keys(Ee).map((s) => [
351
+ s,
352
+ (...m) => u(s, ...m)
353
+ ])
354
+ ));
355
+ return (s, m) => {
356
+ const n = Ye;
357
+ return h(), I(n, F({ class: "jt-input" }, i.value, te(l.value), {
358
+ onKeyup: m[0] || (m[0] = we((d) => u("enter"), ["enter"]))
359
+ }), null, 16);
360
+ };
361
+ }
362
+ }), Ce = /* @__PURE__ */ K($t, [["__scopeId", "data-v-b323beeb"]]), jt = /* @__PURE__ */ R({
363
+ name: "JtSelect",
364
+ __name: "index",
365
+ props: {
366
+ options: {},
367
+ preservePlaceholderWhenDisabled: { type: Boolean },
368
+ ariaLabel: {},
369
+ emptyValues: {},
370
+ valueOnClear: {},
371
+ name: {},
372
+ id: {},
373
+ modelValue: {},
374
+ autocomplete: {},
375
+ automaticDropdown: { type: Boolean },
376
+ size: {},
377
+ effect: {},
378
+ disabled: { type: Boolean },
379
+ clearable: { type: Boolean, default: !0 },
380
+ filterable: { type: Boolean, default: !0 },
381
+ allowCreate: { type: Boolean },
382
+ loading: { type: Boolean },
383
+ popperClass: {},
384
+ popperStyle: {},
385
+ popperOptions: {},
386
+ remote: { type: Boolean },
387
+ debounce: {},
388
+ loadingText: {},
389
+ noMatchText: {},
390
+ noDataText: {},
391
+ remoteMethod: {},
392
+ filterMethod: {},
393
+ multiple: { type: Boolean },
394
+ multipleLimit: {},
395
+ placeholder: {},
396
+ defaultFirstOption: { type: Boolean },
397
+ reserveKeyword: { type: Boolean },
398
+ valueKey: {},
399
+ collapseTags: { type: Boolean },
400
+ collapseTagsTooltip: { type: Boolean },
401
+ tagTooltip: {},
402
+ maxCollapseTags: {},
403
+ teleported: { type: Boolean },
404
+ persistent: { type: Boolean },
405
+ clearIcon: {},
406
+ fitInputWidth: { type: Boolean },
407
+ suffixIcon: {},
408
+ tagType: {},
409
+ tagEffect: {},
410
+ validateEvent: { type: Boolean },
411
+ remoteShowSuffix: { type: Boolean },
412
+ showArrow: { type: Boolean },
413
+ offset: {},
414
+ placement: {},
415
+ fallbackPlacements: {},
416
+ tabindex: {},
417
+ appendTo: {},
418
+ props: {}
419
+ },
420
+ emits: Ie,
421
+ setup(c, { emit: t }) {
422
+ const a = c, i = r(() => {
423
+ const { options: s, placeholder: m, preservePlaceholderWhenDisabled: n, ...d } = a;
424
+ return a.disabled && !n ? d : {
425
+ ...d,
426
+ // 未显式配置 placeholder 时,每次渲染按当前语言重新读取默认文案。
427
+ placeholder: m ?? W("common.请选择")
428
+ };
429
+ }), u = t, l = r(() => Object.fromEntries(
430
+ Object.keys(Ie).map((s) => [
431
+ s,
432
+ (...m) => u(s, ...m)
433
+ ])
434
+ ));
435
+ return (s, m) => {
436
+ const n = Qe, d = Xe;
437
+ return h(), I(d, F({ class: "jt-select" }, i.value, te(l.value)), {
438
+ default: C(() => [
439
+ (h(!0), L(me, null, Y(s.options ?? [], (g) => (h(), I(n, F({
440
+ key: g.value,
441
+ ref_for: !0
442
+ }, g), null, 16))), 128))
443
+ ]),
444
+ _: 1
445
+ }, 16);
446
+ };
447
+ }
448
+ }), St = /* @__PURE__ */ K(jt, [["__scopeId", "data-v-bbfe7769"]]), kt = /* @__PURE__ */ R({
449
+ name: "JTFormItems",
450
+ __name: "JtFormItems",
451
+ props: {
452
+ configs: {},
453
+ formData: {},
454
+ gridColumns: {},
455
+ span: {}
456
+ },
457
+ setup(c) {
458
+ const t = c, a = {
459
+ input: Ce,
460
+ select: St,
461
+ cascader: Ct,
462
+ "date-picker": Bt
463
+ }, i = {
464
+ "remote-select": "select",
465
+ date: "date-picker",
466
+ daterange: "date-picker",
467
+ "date-range": "date-picker",
468
+ dateRange: "date-picker"
469
+ }, u = /* @__PURE__ */ new Set(["prop", "label", "itemType", "span", "options", "rules", "formItemProps", "showSlot", "show"]), l = Object.keys(a), s = /* @__PURE__ */ new Map(), m = r(() => t.configs.filter((f) => f.show !== !1)), n = (f) => {
470
+ const { itemType: p } = f;
471
+ if (!p) return Ce;
472
+ if (typeof p != "string") return p;
473
+ const $ = i[p] ?? p;
474
+ return l.includes($) ? a[$] : (console.error(
475
+ `[JtFormItems] 不支持的 itemType: "${p}",支持的类型: ${l.join(", ")}`
476
+ ), Ce);
477
+ }, d = (f) => {
478
+ const p = ke(f, u);
479
+ return f.itemType === "select" || f.itemType === "remote-select" || f.itemType === "cascader" ? {
480
+ ...p,
481
+ options: f.options
482
+ } : M(f.itemType) ? {
483
+ ...p,
484
+ type: "daterange"
485
+ } : p;
486
+ }, g = (f) => Se(f, u), b = (f) => ({
487
+ rules: f.rules,
488
+ ...f.formItemProps
489
+ }), z = (f, p) => {
490
+ t.formData[f] = p;
491
+ };
492
+ function V(f) {
493
+ return (p) => {
494
+ if (p) {
495
+ s.set(f, p);
496
+ return;
497
+ }
498
+ s.delete(f);
499
+ };
500
+ }
501
+ function _(f, p) {
502
+ Oe(() => {
503
+ s.get(f)?.validate(p).catch(() => {
504
+ });
505
+ });
506
+ }
507
+ const o = (f) => Math.min(Math.max(Math.trunc(f || 4), 1), 24), E = r(() => o(t.gridColumns)), k = (f) => Math.min(Math.max(Math.trunc(f || 1), 1), E.value), q = r(() => {
508
+ const p = m.value.reduce(
509
+ ($, T) => $ + k(t.span || T.span),
510
+ 0
511
+ ) % E.value;
512
+ return p === 0 ? {
513
+ gridColumn: `1 / span ${E.value}`
514
+ } : {
515
+ gridColumn: `${p + 1} / span ${E.value - p}`
516
+ };
517
+ }), w = (f) => ({
518
+ gridColumn: `span ${k(t.span || f.span)}`
519
+ });
520
+ function M(f) {
521
+ return f === "daterange" || f === "date-range" || f === "dateRange";
522
+ }
523
+ return (f, p) => {
524
+ const $ = et;
525
+ return h(), L("div", {
526
+ class: "jt-form-items",
527
+ style: Be({ "--jt-form-columns": E.value })
528
+ }, [
529
+ (h(!0), L(me, null, Y(m.value, (T) => (h(), I($, F({
530
+ key: T.prop,
531
+ ref_for: !0,
532
+ ref: V(T.prop),
533
+ class: "jt-form-items__item",
534
+ style: w(T),
535
+ label: T.label,
536
+ prop: T.prop
537
+ }, b(T)), {
538
+ default: C(() => [
539
+ T.showSlot ? B(f.$slots, T.prop, { key: 0 }, void 0, !0) : (h(), I(Ve(n(T)), F({
540
+ key: 1,
541
+ "model-value": f.formData[T.prop],
542
+ ref_for: !0
543
+ }, d(T), te(g(T)), {
544
+ "onUpdate:modelValue": (j) => z(T.prop, j),
545
+ onChange: () => _(T.prop, "change"),
546
+ onBlur: () => _(T.prop, "blur")
547
+ }), null, 16, ["model-value", "onUpdate:modelValue", "onChange", "onBlur"]))
548
+ ]),
549
+ _: 2
550
+ }, 1040, ["style", "label", "prop"]))), 128)),
551
+ f.$slots.actions ? (h(), I($, {
552
+ key: 0,
553
+ class: "jt-form-items__actions",
554
+ style: Be(q.value)
555
+ }, {
556
+ default: C(() => [
557
+ B(f.$slots, "actions", {}, void 0, !0)
558
+ ]),
559
+ _: 3
560
+ }, 8, ["style"])) : A("", !0)
561
+ ], 4);
562
+ };
563
+ }
564
+ }), Tt = /* @__PURE__ */ K(kt, [["__scopeId", "data-v-10d0f987"]]);
565
+ function Pt() {
566
+ const c = H(!1);
567
+ function t() {
568
+ c.value = !0;
569
+ }
570
+ function a() {
571
+ c.value = !1;
572
+ }
573
+ return {
574
+ searchDisabled: c,
575
+ searchLoading: t,
576
+ searchDone: a
577
+ };
578
+ }
579
+ const xt = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='0.5'%20y='-0.5'%20width='11'%20height='11'%20rx='5.5'%20transform='matrix(1%200%200%20-1%201%2012)'%20stroke='%23999999'/%3e%3cpath%20d='M10%208.16064L7%205.16064L4%208.16064'%20stroke='%23999999'/%3e%3c/svg%3e", Lt = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.375%207.00017C2.375%207.27631%202.59886%207.50017%202.875%207.50017C3.15114%207.50017%203.375%207.27631%203.375%207.00017H2.875H2.375ZM2.875%207.00017H3.375C3.375%204.46334%205.41801%202.41406%207.93713%202.41406V1.91406V1.41406C4.86127%201.41406%202.375%203.91551%202.375%207.00017H2.875ZM7.93713%201.91406V2.41406C10.4563%202.41406%2012.4993%204.46334%2012.4993%207.00017H12.9993H13.4993C13.4993%203.91551%2011.013%201.41406%207.93713%201.41406V1.91406ZM12.9993%207.00017H12.4993C12.4993%209.537%2010.4563%2011.5863%207.93713%2011.5863V12.0863V12.5863C11.013%2012.5863%2013.4993%2010.0848%2013.4993%207.00017H12.9993ZM7.93713%2012.0863V11.5863C6.68975%2011.5863%205.55663%2011.0806%204.72892%2010.2635L4.37765%2010.6193L4.02638%2010.9752C5.0317%2011.9676%206.41366%2012.5863%207.93713%2012.5863V12.0863Z'%20fill='%23999999'/%3e%3cpath%20d='M4.75131%206.0102L2.88631%207.88403L1%205.99414'%20stroke='%23999999'%20stroke-miterlimit='10'/%3e%3c/svg%3e", zt = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.60938%2012.1099C9.64694%2012.1099%2012.1094%209.64743%2012.1094%206.60986C12.1094%203.5723%209.64694%201.10986%206.60938%201.10986C3.57181%201.10986%201.10938%203.5723%201.10938%206.60986C1.10938%209.64743%203.57181%2012.1099%206.60938%2012.1099Z'%20stroke='white'%20stroke-miterlimit='10'/%3e%3cpath%20d='M12.4993%2012.5002L10.2832%2010.3301'%20stroke='white'%20stroke-miterlimit='10'/%3e%3c/svg%3e", Et = { class: "jt-filter-bar__btns" }, It = ["src"], Mt = ["src"], Dt = ["src"], Vt = /* @__PURE__ */ R({
580
+ name: "JtFilterBar",
581
+ __name: "JtFilterBar",
582
+ props: {
583
+ columns: {},
584
+ option: { default: () => ({}) },
585
+ modelValue: {}
586
+ },
587
+ emits: ["update:modelValue", "search", "reset"],
588
+ setup(c, { expose: t, emit: a }) {
589
+ const i = c, u = a, l = H(), s = oe(), m = H({}), { searchDisabled: n, searchLoading: d, searchDone: g } = Pt(), b = H({}), z = H({}), V = /* @__PURE__ */ new Map(), _ = r(() => i.option), o = H(_.value.searchCollapsed ?? !0), E = r(
590
+ () => i.columns.filter((e) => e.search === !0)
591
+ ), k = r(
592
+ () => Math.max(1, _.value.searchSpan ?? 4)
593
+ ), q = r(
594
+ () => Math.max(1, _.value.searchCollapsedRows ?? 1)
595
+ ), w = r(() => k.value), M = r(
596
+ () => Math.max(1, w.value * q.value)
597
+ ), f = r(() => k.value), p = r(
598
+ () => U.value ? "264px" : "174px"
599
+ ), $ = r(
600
+ () => Ke(_.value.searchLabelWidth ?? 84)
601
+ ), T = r(
602
+ () => _.value.searchLabelPosition ?? "top"
603
+ ), j = r(
604
+ () => xe(_.value.searchGutter, 16)
605
+ ), v = r(
606
+ () => xe(_.value.searchRowGap, 10)
607
+ ), D = r(
608
+ () => Ue(_.value.searchPadding ?? "0 12px")
609
+ ), U = r(() => _.value.searchCollapse === !1 ? !1 : be(E.value) > M.value), N = r(() => {
610
+ if (!U.value || !o.value) return E.value;
611
+ let e = 0;
612
+ return E.value.filter((y) => {
613
+ const P = ye(y);
614
+ return e + P > M.value ? !1 : (e += P, !0);
615
+ });
616
+ }), Q = r(
617
+ () => N.value.filter((e) => !!s[`${e.prop}-search`])
618
+ ), ae = r(() => {
619
+ const e = be(N.value);
620
+ return N.value.length > 0 && N.value.length <= 2 && e < k.value;
621
+ }), G = r(() => {
622
+ const e = be(N.value);
623
+ return `${Math.min(k.value, e + 1)}`;
624
+ }), fe = r(
625
+ () => N.value.map((e) => ie(e))
626
+ );
627
+ ce(
628
+ () => _.value.searchCollapsed,
629
+ (e) => {
630
+ typeof e == "boolean" && (o.value = e);
631
+ }
632
+ ), ce(
633
+ () => i.modelValue,
634
+ (e) => {
635
+ m.value = { ...e };
636
+ },
637
+ { deep: !0, immediate: !0 }
638
+ );
639
+ function se(e, y) {
640
+ if (n.value) return;
641
+ const P = { ...m.value, [e]: y };
642
+ m.value = P, u("update:modelValue", P);
643
+ }
644
+ function ie(e) {
645
+ const y = e.searchProps ?? {}, P = e.searchType ?? "input", O = ve(e, y);
646
+ return {
647
+ ...y,
648
+ ...O,
649
+ prop: e.prop,
650
+ label: e.searchLabel ?? e.label,
651
+ span: ye(e),
652
+ itemType: P,
653
+ // 外部提供 `${prop}-search` 时交给插槽渲染,保持旧版 JtFilterBar 的自定义能力。
654
+ showSlot: !!s[`${e.prop}-search`],
655
+ options: Re(e, y),
656
+ placeholder: y.placeholder ?? e.searchPlaceholder,
657
+ valueFormat: y.valueFormat ?? e.searchValueFormat,
658
+ disabled: n.value || y.disabled === !0,
659
+ loading: Ae(e, y),
660
+ preservePlaceholderWhenDisabled: n.value,
661
+ formItemProps: {
662
+ required: e.searchRequired,
663
+ class: ["jt-filter-bar__item", { "is-required": e.searchRequired }]
664
+ },
665
+ // 保留原来输入框回车触发查询的行为,同时不吞掉使用方在 searchProps 中传入的 onEnter。
666
+ onEnter: (...ee) => {
667
+ he(y.onEnter, ...ee), ue();
668
+ },
669
+ // JtFormItems 内部会修改 filterModel,这里继续按旧接口向外 emit update:modelValue。
670
+ "onUpdate:modelValue": (ee) => {
671
+ he(y["onUpdate:modelValue"], ee), se(e.prop, ee);
672
+ }
673
+ };
674
+ }
675
+ function ve(e, y) {
676
+ if (e.searchType !== "remote-select") return {};
677
+ const P = e.searchRemoteMethod ? (O) => We(e, O) : y.remoteMethod;
678
+ return {
679
+ // remote-select 明确进入 Element Plus 远程搜索模式,避免调用方重复配置 remote。
680
+ remote: y.remote ?? !!P,
681
+ filterable: y.filterable ?? !0,
682
+ remoteMethod: P
683
+ };
684
+ }
685
+ function Re(e, y) {
686
+ return e.searchType === "remote-select" && Object.prototype.hasOwnProperty.call(b.value, e.prop) ? b.value[e.prop] : y.options ?? e.searchOptions ?? e.dicData;
687
+ }
688
+ function Ae(e, y) {
689
+ return e.searchLoading !== void 0 ? e.searchLoading : y.loading !== void 0 ? y.loading : e.searchType === "remote-select" && e.searchRemoteMethod ? z.value[e.prop] === !0 : y.loading;
690
+ }
691
+ async function We(e, y) {
692
+ if (!e.searchRemoteMethod) return;
693
+ const P = (V.get(e.prop) ?? 0) + 1;
694
+ V.set(e.prop, P), e.searchLoading === void 0 && (z.value = { ...z.value, [e.prop]: !0 });
695
+ try {
696
+ const O = await e.searchRemoteMethod(y, e);
697
+ if (V.get(e.prop) !== P || O === void 0) return;
698
+ if (!Te(O)) {
699
+ console.warn(
700
+ `[JtFilterBar] ${e.prop} 的 searchRemoteMethod 应返回 JtDicItem[] 或 void,请在业务方法内把接口响应映射为 { label, value } 选项。`
701
+ );
702
+ return;
703
+ }
704
+ b.value = { ...b.value, [e.prop]: O };
705
+ } catch (O) {
706
+ console.error("[JtFilterBar] searchRemoteMethod 执行失败", O);
707
+ } finally {
708
+ V.get(e.prop) === P && e.searchLoading === void 0 && (z.value = { ...z.value, [e.prop]: !1 });
709
+ }
710
+ }
711
+ function Te(e) {
712
+ return Array.isArray(e) && e.every(He);
713
+ }
714
+ function He(e) {
715
+ if (!e || typeof e != "object") return !1;
716
+ const y = e, P = typeof y.value, O = y.children;
717
+ return typeof y.label == "string" && (P === "string" || P === "number" || P === "boolean") && (y.disabled === void 0 || typeof y.disabled == "boolean") && (O === void 0 || Te(O));
718
+ }
719
+ function he(e, ...y) {
720
+ if (Array.isArray(e)) {
721
+ e.forEach((P) => he(P, ...y));
722
+ return;
723
+ }
724
+ typeof e == "function" && e(...y);
725
+ }
726
+ async function ue() {
727
+ if (!n.value) {
728
+ if (l.value)
729
+ try {
730
+ await l.value.validate();
731
+ } catch {
732
+ return;
733
+ }
734
+ u("search");
735
+ }
736
+ }
737
+ function ge() {
738
+ n.value || u("reset");
739
+ }
740
+ function Pe() {
741
+ o.value = !o.value;
742
+ }
743
+ function ye(e) {
744
+ return Math.min(k.value, Math.max(1, e.searchSpan ?? 1));
745
+ }
746
+ function be(e) {
747
+ return e.reduce((y, P) => y + ye(P), 0);
748
+ }
749
+ function Ke(e) {
750
+ return typeof e == "number" ? `${e}px` : e;
751
+ }
752
+ function xe(e, y) {
753
+ return typeof e == "number" ? e : y;
754
+ }
755
+ function Ue(e) {
756
+ return typeof e == "number" ? `${e}px` : e;
757
+ }
758
+ return t({
759
+ /** 内部 Element Plus Form 实例,保留给业务侧做校验、重置等原生表单操作。 */
760
+ formRef: l,
761
+ /** 当前筛选表单禁用态。 */
762
+ searchDisabled: n,
763
+ /** 开启筛选表单禁用。 */
764
+ searchLoading: d,
765
+ /** 关闭筛选表单禁用。 */
766
+ searchDone: g
767
+ }), (e, y) => {
768
+ const P = tt;
769
+ return h(), L("div", {
770
+ class: de(["jt-filter-bar", [
771
+ `is-label-${T.value}`,
772
+ { "is-single-filter": ae.value }
773
+ ]]),
774
+ style: Be({
775
+ "--jt-filter-columns": k.value,
776
+ "--jt-filter-field-columns": f.value,
777
+ "--jt-filter-btns-width": p.value,
778
+ "--jt-filter-actions-start": G.value,
779
+ "--jt-filter-label-width": $.value,
780
+ "--jt-filter-column-gap": `${j.value}px`,
781
+ "--jt-filter-row-gap": `${v.value}px`,
782
+ "--jt-filter-padding": D.value
783
+ })
784
+ }, [
785
+ Z(P, {
786
+ ref_key: "formRef",
787
+ ref: l,
788
+ class: "jt-filter-bar__form",
789
+ model: m.value,
790
+ "label-position": T.value,
791
+ "label-width": $.value,
792
+ disabled: x(n),
793
+ onSubmit: y[0] || (y[0] = $e(() => {
794
+ }, ["prevent"]))
795
+ }, {
796
+ default: C(() => [
797
+ Z(x(Tt), {
798
+ configs: fe.value,
799
+ "form-data": m.value,
800
+ style: { "--jt-form-label-gap": "6px", "--jt-form-column-gap": "16px", "--jt-form-row-gap": "10px" }
801
+ }, re({
802
+ actions: C(() => [
803
+ S("div", Et, [
804
+ B(e.$slots, "search-menu", {
805
+ search: ue,
806
+ reset: ge,
807
+ disabled: x(n),
808
+ collapsed: o.value,
809
+ toggleCollapse: Pe
810
+ }, () => [
811
+ U.value ? (h(), I(x(X), {
812
+ key: 0,
813
+ class: "jt-filter-bar__btn-collapse",
814
+ border: "",
815
+ onClick: Pe
816
+ }, {
817
+ icon: C(() => [
818
+ S("img", {
819
+ class: de(["jt-filter-bar__icon-arrow", { "is-collapsed": o.value }]),
820
+ src: x(xt),
821
+ alt: ""
822
+ }, null, 10, It)
823
+ ]),
824
+ default: C(() => [
825
+ S("span", null, J(o.value ? x(W)("common.展开") : x(W)("common.收起")), 1)
826
+ ]),
827
+ _: 1
828
+ })) : A("", !0),
829
+ Z(x(X), {
830
+ class: "jt-filter-bar__btn-reset",
831
+ disabled: x(n),
832
+ border: "",
833
+ onClick: ge
834
+ }, {
835
+ icon: C(() => [
836
+ S("img", {
837
+ src: x(Lt),
838
+ alt: ""
839
+ }, null, 8, Mt)
840
+ ]),
841
+ default: C(() => [
842
+ S("span", null, J(_.value.resetBtnText ?? x(W)("common.重置")), 1)
843
+ ]),
844
+ _: 1
845
+ }, 8, ["disabled"]),
846
+ Z(x(X), {
847
+ class: "jt-filter-bar__btn-query",
848
+ type: "primary",
849
+ disabled: x(n),
850
+ onClick: ue
851
+ }, {
852
+ icon: C(() => [
853
+ S("img", {
854
+ src: x(zt),
855
+ alt: ""
856
+ }, null, 8, Dt)
857
+ ]),
858
+ default: C(() => [
859
+ S("span", null, J(_.value.searchBtnText ?? x(W)("common.查询")), 1)
860
+ ]),
861
+ _: 1
862
+ }, 8, ["disabled"])
863
+ ], !0)
864
+ ])
865
+ ]),
866
+ _: 2
867
+ }, [
868
+ Y(Q.value, (O) => ({
869
+ name: O.prop,
870
+ fn: C(() => [
871
+ B(e.$slots, `${O.prop}-search`, {
872
+ value: m.value[O.prop],
873
+ column: O,
874
+ setValue: (ee) => se(O.prop, ee),
875
+ search: ue,
876
+ reset: ge,
877
+ disabled: x(n)
878
+ }, void 0, !0)
879
+ ])
880
+ }))
881
+ ]), 1032, ["configs", "form-data"])
882
+ ]),
883
+ _: 3
884
+ }, 8, ["model", "label-position", "label-width", "disabled"])
885
+ ], 6);
886
+ };
887
+ }
888
+ }), Ot = /* @__PURE__ */ K(Vt, [["__scopeId", "data-v-0c235f2f"]]), Jt = { key: 1 }, Ft = { key: 2 }, Rt = { key: 3 }, At = /* @__PURE__ */ R({
889
+ name: "JtTable",
890
+ __name: "JtTable",
891
+ props: {
892
+ data: {},
893
+ columns: {},
894
+ option: {},
895
+ tableEvents: {}
896
+ },
897
+ setup(c, { expose: t }) {
898
+ const a = c, i = oe(), u = H(), l = r(() => a.option ?? {}), s = r(() => a.columns.filter((o) => !o.hide)), m = r(() => l.value.menuFixed ?? "right");
899
+ function n(o) {
900
+ return !!i[`${o}-header`];
901
+ }
902
+ function d(o) {
903
+ return !!i[`${o}-data`];
904
+ }
905
+ function g(o) {
906
+ return {
907
+ width: o.width,
908
+ minWidth: o.minWidth,
909
+ align: o.align || "center",
910
+ fixed: o.fixed,
911
+ sortable: o.sortable,
912
+ showOverflowTooltip: o.showOverflowTooltip ?? b(o),
913
+ ...o.columnOptions
914
+ };
915
+ }
916
+ function b(o) {
917
+ return !d(o.prop) && !V(o.columnOptions?.type);
918
+ }
919
+ function z(o) {
920
+ return !V(o.columnOptions?.type);
921
+ }
922
+ function V(o) {
923
+ return o === "selection" || o === "index" || o === "expand";
924
+ }
925
+ function _(o, E) {
926
+ return o.find((k) => k.value === E)?.label ?? String(E ?? "");
927
+ }
928
+ return t({ tableRef: u }), (o, E) => {
929
+ const k = at, q = ot;
930
+ return h(), I(q, F({
931
+ ref_key: "tableRef",
932
+ ref: u,
933
+ data: o.data,
934
+ "row-key": l.value.rowKey ?? "id",
935
+ "empty-text": l.value.emptyText,
936
+ stripe: l.value.tableProps?.stripe ?? !0,
937
+ class: "jt-table"
938
+ }, l.value.tableProps, te(o.tableEvents)), {
939
+ default: C(() => [
940
+ l.value.selection ? (h(), I(k, {
941
+ key: 0,
942
+ type: "selection",
943
+ width: "55",
944
+ align: "center"
945
+ })) : A("", !0),
946
+ l.value.index ? (h(), I(k, {
947
+ key: 1,
948
+ type: "index",
949
+ label: l.value.indexLabel ?? x(W)("common.序号"),
950
+ width: "60",
951
+ align: "center"
952
+ }, null, 8, ["label"])) : A("", !0),
953
+ (h(!0), L(me, null, Y(s.value, (w) => (h(), I(k, F({
954
+ key: w.prop,
955
+ prop: w.prop,
956
+ label: w.label,
957
+ formatter: !d(w.prop) && !w.dicData ? w.formatter : void 0,
958
+ ref_for: !0
959
+ }, g(w)), re({ _: 2 }, [
960
+ n(w.prop) ? {
961
+ name: "header",
962
+ fn: C((M) => [
963
+ B(o.$slots, `${w.prop}-header`, F({ ref_for: !0 }, M), void 0, !0)
964
+ ]),
965
+ key: "0"
966
+ } : void 0,
967
+ z(w) ? {
968
+ name: "default",
969
+ fn: C((M) => [
970
+ d(w.prop) ? B(o.$slots, `${w.prop}-data`, F({
971
+ key: 0,
972
+ ref_for: !0
973
+ }, M), void 0, !0) : w.dicData ? (h(), L("span", Jt, J(_(w.dicData, M.row[w.prop])), 1)) : w.formatter ? (h(), L("span", Ft, J(w.formatter(
974
+ M.row,
975
+ M.column,
976
+ M.row[w.prop],
977
+ M.$index
978
+ )), 1)) : (h(), L("span", Rt, J(M.row[w.prop]), 1))
979
+ ]),
980
+ key: "1"
981
+ } : void 0
982
+ ]), 1040, ["prop", "label", "formatter"]))), 128)),
983
+ l.value.menu ? (h(), I(k, {
984
+ key: 2,
985
+ label: l.value.menuLabel ?? x(W)("common.操作"),
986
+ width: l.value.menuWidth,
987
+ "min-width": l.value.menuMinWidth,
988
+ align: l.value.menuAlign ?? "center",
989
+ fixed: m.value
990
+ }, {
991
+ default: C((w) => [
992
+ B(o.$slots, "menu", ne(le(w)), void 0, !0)
993
+ ]),
994
+ _: 3
995
+ }, 8, ["label", "width", "min-width", "align", "fixed"])) : A("", !0)
996
+ ]),
997
+ _: 3
998
+ }, 16, ["data", "row-key", "empty-text", "stripe"]);
999
+ };
1000
+ }
1001
+ }), Wt = /* @__PURE__ */ K(At, [["__scopeId", "data-v-9784ab78"]]), Ht = { class: "jt-pagination" }, Kt = { class: "jt-pagination__count" }, Ut = /* @__PURE__ */ R({
1002
+ name: "JtPagination",
1003
+ __name: "JtPagination",
1004
+ props: {
1005
+ currentPage: {},
1006
+ pageSize: {},
1007
+ total: {},
1008
+ option: {}
1009
+ },
1010
+ emits: ["update:currentPage", "update:pageSize", "current-change", "page-change", "size-change"],
1011
+ setup(c, { emit: t }) {
1012
+ const a = c, i = r(() => a.option ?? {}), u = t;
1013
+ function l(s) {
1014
+ u("current-change", s), u("page-change", s);
1015
+ }
1016
+ return (s, m) => {
1017
+ const n = nt;
1018
+ return h(), L("div", Ht, [
1019
+ Z(n, {
1020
+ "current-page": s.currentPage,
1021
+ "page-size": s.pageSize,
1022
+ "page-sizes": i.value.pageSizes ?? [10, 20, 50, 100],
1023
+ total: s.total,
1024
+ layout: i.value.paginationLayout ?? "sizes, prev, pager, next, jumper",
1025
+ "onUpdate:currentPage": m[0] || (m[0] = (d) => s.$emit("update:currentPage", d)),
1026
+ "onUpdate:pageSize": m[1] || (m[1] = (d) => s.$emit("update:pageSize", d)),
1027
+ onCurrentChange: l,
1028
+ onSizeChange: m[2] || (m[2] = (d) => s.$emit("size-change", d))
1029
+ }, null, 8, ["current-page", "page-size", "page-sizes", "total", "layout"]),
1030
+ S("span", Kt, J(x(W)("common.共{total}条记录", "共 {total} 条记录", { total: s.total })), 1)
1031
+ ]);
1032
+ };
1033
+ }
1034
+ }), qt = /* @__PURE__ */ K(Ut, [["__scopeId", "data-v-03d564ec"]]), Nt = { class: "jt-crud-table" }, Zt = { class: "filter-bar-box" }, Gt = { class: "jt-crud-table__result" }, Yt = { class: "jt-crud-table__table-group" }, Xt = {
1035
+ key: 0,
1036
+ class: "jt-crud-table__toolbar"
1037
+ }, Qt = /* @__PURE__ */ R({
1038
+ name: "JtCrudTable",
1039
+ __name: "JtCrudTable",
1040
+ props: /* @__PURE__ */ Le({
1041
+ columns: {},
1042
+ option: { default: () => ({}) },
1043
+ data: {},
1044
+ total: { default: 0 },
1045
+ tableEvents: {}
1046
+ }, {
1047
+ currentPage: { default: 1 },
1048
+ currentPageModifiers: {},
1049
+ pageSize: { default: 20 },
1050
+ pageSizeModifiers: {},
1051
+ searchModel: {
1052
+ default: () => ({})
1053
+ },
1054
+ searchModelModifiers: {}
1055
+ }),
1056
+ emits: /* @__PURE__ */ Le(["search", "reset", "page-change", "size-change"], ["update:currentPage", "update:pageSize", "update:searchModel"]),
1057
+ setup(c, { expose: t, emit: a }) {
1058
+ const i = c, u = a, l = _e(c, "currentPage"), s = _e(c, "pageSize"), m = _e(c, "searchModel"), n = oe(), d = H(), g = H(), b = r(() => i.option), z = r(() => b.value.searchShow !== !1), V = r(
1059
+ () => b.value.paginationShow !== !1
1060
+ ), _ = r(
1061
+ () => i.columns.filter((p) => p.search && !!n[`${p.prop}-search`])
1062
+ ), o = r(
1063
+ () => i.columns.filter((p) => !p.hide && !!n[`${p.prop}-header`])
1064
+ ), E = r(
1065
+ () => i.columns.filter((p) => !p.hide && !!n[`${p.prop}-data`])
1066
+ );
1067
+ function k() {
1068
+ const p = {};
1069
+ return i.columns.forEach(($) => {
1070
+ $.search && (p[$.prop] = void 0);
1071
+ }), p;
1072
+ }
1073
+ function q() {
1074
+ u("search", { ...m.value });
1075
+ }
1076
+ function w() {
1077
+ m.value = k(), u("reset");
1078
+ }
1079
+ function M() {
1080
+ g.value?.searchLoading();
1081
+ }
1082
+ function f() {
1083
+ g.value?.searchDone();
1084
+ }
1085
+ return t({
1086
+ /** 获取内部 el-table 实例 */
1087
+ tableRef: r(() => d.value?.tableRef),
1088
+ /** 获取内部筛选条实例 */
1089
+ filterBarRef: g,
1090
+ /** 开启筛选表单禁用。 */
1091
+ searchLoading: M,
1092
+ /** 关闭筛选表单禁用。 */
1093
+ searchDone: f
1094
+ }), (p, $) => {
1095
+ const T = lt;
1096
+ return h(), L("div", Nt, [
1097
+ B(p.$slots, "header", {}, void 0, !0),
1098
+ S("div", Zt, [
1099
+ z.value ? (h(), I(Ot, {
1100
+ key: 0,
1101
+ ref_key: "filterBarRef",
1102
+ ref: g,
1103
+ modelValue: m.value,
1104
+ "onUpdate:modelValue": $[0] || ($[0] = (j) => m.value = j),
1105
+ columns: p.columns,
1106
+ option: b.value,
1107
+ onSearch: q,
1108
+ onReset: w
1109
+ }, re({ _: 2 }, [
1110
+ Y(_.value, (j) => ({
1111
+ name: `${j.prop}-search`,
1112
+ fn: C((v) => [
1113
+ B(p.$slots, `${j.prop}-search`, ne(le(v)), void 0, !0)
1114
+ ])
1115
+ }))
1116
+ ]), 1032, ["modelValue", "columns", "option"])) : A("", !0)
1117
+ ]),
1118
+ S("div", Gt, [
1119
+ S("div", Yt, [
1120
+ x(n).toolbar ? (h(), L("div", Xt, [
1121
+ B(p.$slots, "toolbar", {}, void 0, !0)
1122
+ ])) : A("", !0),
1123
+ it((h(), I(Wt, {
1124
+ ref_key: "jtTableRef",
1125
+ ref: d,
1126
+ data: p.data,
1127
+ columns: p.columns,
1128
+ option: b.value,
1129
+ "table-events": p.tableEvents
1130
+ }, re({ _: 2 }, [
1131
+ Y(o.value, (j) => ({
1132
+ name: `${j.prop}-header`,
1133
+ fn: C((v) => [
1134
+ B(p.$slots, `${j.prop}-header`, ne(le(v)), void 0, !0)
1135
+ ])
1136
+ })),
1137
+ Y(E.value, (j) => ({
1138
+ name: `${j.prop}-data`,
1139
+ fn: C((v) => [
1140
+ B(p.$slots, `${j.prop}-data`, ne(le(v)), void 0, !0)
1141
+ ])
1142
+ })),
1143
+ b.value.menu ? {
1144
+ name: "menu",
1145
+ fn: C((j) => [
1146
+ B(p.$slots, "menu", ne(le(j)), void 0, !0)
1147
+ ]),
1148
+ key: "0"
1149
+ } : void 0
1150
+ ]), 1032, ["data", "columns", "option", "table-events"])), [
1151
+ [T, b.value.loading]
1152
+ ])
1153
+ ]),
1154
+ V.value ? (h(), I(qt, {
1155
+ key: 0,
1156
+ "current-page": l.value,
1157
+ "onUpdate:currentPage": $[1] || ($[1] = (j) => l.value = j),
1158
+ "page-size": s.value,
1159
+ "onUpdate:pageSize": $[2] || ($[2] = (j) => s.value = j),
1160
+ total: p.total,
1161
+ option: b.value,
1162
+ onPageChange: $[3] || ($[3] = (j) => p.$emit("page-change", j)),
1163
+ onSizeChange: $[4] || ($[4] = (j) => p.$emit("size-change", j))
1164
+ }, null, 8, ["current-page", "page-size", "total", "option"])) : A("", !0)
1165
+ ])
1166
+ ]);
1167
+ };
1168
+ }
1169
+ }), Io = /* @__PURE__ */ K(Qt, [["__scopeId", "data-v-335c2682"]]), eo = {
1170
+ key: 0,
1171
+ class: "jt-card__title"
1172
+ }, to = {
1173
+ key: 1,
1174
+ class: "jt-card__content"
1175
+ }, oo = /* @__PURE__ */ R({
1176
+ name: "JtCard",
1177
+ __name: "index",
1178
+ props: {
1179
+ title: {}
1180
+ },
1181
+ setup(c) {
1182
+ const t = c, a = oe(), i = r(() => !!(t.title || a.title)), u = r(() => !!(a.content || a.default));
1183
+ return (l, s) => (h(), L("div", F({ class: "jt-card" }, l.$attrs), [
1184
+ i.value ? (h(), L("div", eo, [
1185
+ B(l.$slots, "title", {}, () => [
1186
+ S("span", null, J(l.title), 1)
1187
+ ], !0)
1188
+ ])) : A("", !0),
1189
+ u.value ? (h(), L("div", to, [
1190
+ B(l.$slots, "content", {}, () => [
1191
+ B(l.$slots, "default", {}, void 0, !0)
1192
+ ], !0)
1193
+ ])) : A("", !0)
1194
+ ], 16));
1195
+ }
1196
+ }), Mo = /* @__PURE__ */ K(oo, [["__scopeId", "data-v-e4895e88"]]), ao = { class: "jt-drawer__body" }, no = { class: "jt-drawer__footer" }, lo = { class: "jt-drawer__footer-actions" }, Do = /* @__PURE__ */ R({
1197
+ name: "JtDrawer",
1198
+ __name: "index",
1199
+ props: {
1200
+ direction: { default: "rtl" },
1201
+ resizable: { type: Boolean },
1202
+ withHeader: { type: Boolean },
1203
+ modalFade: { type: Boolean },
1204
+ headerAriaLevel: {},
1205
+ appendToBody: { type: Boolean },
1206
+ appendTo: {},
1207
+ beforeClose: {},
1208
+ destroyOnClose: { type: Boolean },
1209
+ closeOnClickModal: { type: Boolean },
1210
+ closeOnPressEscape: { type: Boolean },
1211
+ lockScroll: { type: Boolean },
1212
+ modal: { type: Boolean, default: !0 },
1213
+ modalPenetrable: { type: Boolean },
1214
+ openDelay: {},
1215
+ closeDelay: {},
1216
+ top: {},
1217
+ modelValue: { type: Boolean },
1218
+ modalClass: { default: "jt-drawer-modal" },
1219
+ width: {},
1220
+ zIndex: {},
1221
+ trapFocus: { type: Boolean },
1222
+ transition: {},
1223
+ center: { type: Boolean },
1224
+ alignCenter: { type: Boolean },
1225
+ closeIcon: {},
1226
+ draggable: { type: Boolean },
1227
+ overflow: { type: Boolean },
1228
+ fullscreen: { type: Boolean },
1229
+ headerClass: {},
1230
+ bodyClass: {},
1231
+ footerClass: {},
1232
+ showClose: { type: Boolean },
1233
+ title: {},
1234
+ ariaLevel: {},
1235
+ size: { default: "default" },
1236
+ cancelText: { default: W("common.取消") },
1237
+ confirmText: { default: W("common.确认") },
1238
+ confirmLoading: { type: Boolean, default: !1 },
1239
+ showFooter: { type: Boolean, default: !0 }
1240
+ },
1241
+ emits: ["cancel", "confirm"],
1242
+ setup(c, { emit: t }) {
1243
+ const a = {
1244
+ default: "838px",
1245
+ large: "1242px"
1246
+ }, i = /* @__PURE__ */ new Set([
1247
+ "cancelText",
1248
+ "confirmText",
1249
+ "confirmLoading",
1250
+ "showFooter"
1251
+ ]), u = c, l = t, s = De(), m = r(() => {
1252
+ const {
1253
+ cancelText: d,
1254
+ confirmText: g,
1255
+ confirmLoading: b,
1256
+ showFooter: z,
1257
+ size: V,
1258
+ ..._
1259
+ } = u;
1260
+ return {
1261
+ ...ke(s, i),
1262
+ ..._,
1263
+ size: a[V],
1264
+ withHeader: !1,
1265
+ modalClass: ["jt-drawer-modal", _.modalClass].filter(Boolean).join(" ")
1266
+ };
1267
+ }), n = r(() => Se(s));
1268
+ return (d, g) => {
1269
+ const b = rt;
1270
+ return h(), I(b, F({
1271
+ class: "jt-drawer",
1272
+ "lock-model": ""
1273
+ }, m.value, te(n.value)), re({
1274
+ default: C(() => [
1275
+ S("section", ao, [
1276
+ B(d.$slots, "body", {}, () => [
1277
+ B(d.$slots, "default")
1278
+ ])
1279
+ ])
1280
+ ]),
1281
+ _: 2
1282
+ }, [
1283
+ d.showFooter ? {
1284
+ name: "footer",
1285
+ fn: C(() => [
1286
+ S("footer", no, [
1287
+ B(d.$slots, "footer", {}, () => [
1288
+ S("div", lo, [
1289
+ Z(X, {
1290
+ class: "jt-drawer__footer-button",
1291
+ size: "middle",
1292
+ gray: "",
1293
+ disabled: d.confirmLoading,
1294
+ onClick: g[0] || (g[0] = (z) => l("cancel"))
1295
+ }, {
1296
+ default: C(() => [
1297
+ pe(J(d.cancelText), 1)
1298
+ ]),
1299
+ _: 1
1300
+ }, 8, ["disabled"]),
1301
+ Z(X, {
1302
+ class: "jt-drawer__footer-button",
1303
+ size: "middle",
1304
+ type: "primary",
1305
+ loading: d.confirmLoading,
1306
+ disabled: d.confirmLoading,
1307
+ onClick: g[1] || (g[1] = (z) => l("confirm"))
1308
+ }, {
1309
+ default: C(() => [
1310
+ pe(J(d.confirmText), 1)
1311
+ ]),
1312
+ _: 1
1313
+ }, 8, ["loading", "disabled"])
1314
+ ])
1315
+ ])
1316
+ ])
1317
+ ]),
1318
+ key: "0"
1319
+ } : void 0
1320
+ ]), 1040);
1321
+ };
1322
+ }
1323
+ }), ro = "data:image/svg+xml,%3csvg%20width='22'%20height='22'%20viewBox='0%200%2022%2022'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11%202C6.04082%202%202%206.04082%202%2011C2%2015.9592%206.04082%2020%2011%2020C15.9592%2020%2020%2015.9592%2020%2011C20%206.04082%2015.9592%202%2011%202ZM10.2653%207.78572C10.2653%207.41837%2010.5408%207.05102%2011%207.05102C11.4592%207.05102%2011.7347%207.32653%2011.7347%207.78572V11.4592C11.7347%2011.8265%2011.4592%2012.1939%2011%2012.1939C10.5408%2012.1939%2010.2653%2011.9184%2010.2653%2011.4592V7.78572ZM11%2015.1327C10.5408%2015.1327%2010.0816%2014.6735%2010.0816%2014.2143C10.0816%2013.7551%2010.5408%2013.2959%2011%2013.2959C11.4592%2013.2959%2011.9184%2013.7551%2011.9184%2014.2143C11.9184%2014.6735%2011.4592%2015.1327%2011%2015.1327Z'%20fill='%23E60000'/%3e%3c/svg%3e", so = "data:image/svg+xml,%3csvg%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='28'%20height='28'%20rx='14'%20fill='%23F9F9F9'/%3e%3cpath%20d='M19.7294%207.21079C20.0223%206.91808%2020.4971%206.91797%2020.79%207.21079C21.0828%207.50362%2021.0827%207.97843%2020.79%208.27134L15.0615%2013.9999L20.79%2019.7284C21.0828%2020.0212%2021.0827%2020.496%2020.79%2020.7889C20.4971%2021.0818%2020.0223%2021.0818%2019.7294%2020.7889L14.0009%2015.0604L8.2724%2020.7889C7.97952%2021.0818%207.50475%2021.0818%207.21186%2020.7889C6.91898%2020.496%206.91897%2020.0213%207.21186%2019.7284L12.9404%2013.9999L7.21186%208.27134C6.91896%207.97844%206.91896%207.50368%207.21186%207.21079C7.50477%206.91808%207.97957%206.91796%208.2724%207.21079L14.0009%2012.9393L19.7294%207.21079Z'%20fill='%23666666'/%3e%3c/svg%3e", io = { class: "jt-confirm-dialog-panel" }, uo = { class: "jt-confirm-dialog-panel__header" }, co = { class: "jt-confirm-dialog-panel__title" }, po = { class: "jt-confirm-dialog__body" }, mo = { class: "jt-confirm-dialog__desc" }, fo = { class: "jt-confirm-dialog__footer" }, vo = /* @__PURE__ */ R({
1324
+ name: "JtConfirmDialog",
1325
+ __name: "index",
1326
+ props: {
1327
+ title: { default: "数据启用提示" },
1328
+ desc: { default: "点击确定后,将启用该条数据" },
1329
+ confirmText: { default: "确 定" },
1330
+ cancelText: { default: "取 消" },
1331
+ confirmLoading: { type: Boolean, default: !1 }
1332
+ },
1333
+ emits: ["close", "confirm"],
1334
+ setup(c, { emit: t }) {
1335
+ const a = t;
1336
+ return (i, u) => (h(), L("section", io, [
1337
+ S("header", uo, [
1338
+ S("div", co, [
1339
+ u[3] || (u[3] = S("img", {
1340
+ class: "jt-confirm-dialog-panel__icon",
1341
+ src: ro,
1342
+ alt: ""
1343
+ }, null, -1)),
1344
+ S("span", null, J(i.title), 1)
1345
+ ]),
1346
+ S("img", {
1347
+ onClick: u[0] || (u[0] = (l) => a("close")),
1348
+ class: "jt-confirm-dialog-panel__close jt-confirm-dialog-panel__close-icon",
1349
+ src: so,
1350
+ alt: ""
1351
+ })
1352
+ ]),
1353
+ S("div", po, [
1354
+ B(i.$slots, "default", {}, () => [
1355
+ S("p", mo, J(i.desc), 1)
1356
+ ], !0)
1357
+ ]),
1358
+ S("footer", fo, [
1359
+ Z(X, {
1360
+ class: "jt-confirm-dialog__button jt-confirm-dialog__button--cancel",
1361
+ size: "middle",
1362
+ gray: "",
1363
+ disabled: i.confirmLoading,
1364
+ onClick: u[1] || (u[1] = (l) => a("close"))
1365
+ }, {
1366
+ default: C(() => [
1367
+ pe(J(i.cancelText), 1)
1368
+ ]),
1369
+ _: 1
1370
+ }, 8, ["disabled"]),
1371
+ Z(X, {
1372
+ class: "jt-confirm-dialog__button jt-confirm-dialog__button--confirm",
1373
+ size: "middle",
1374
+ type: "primary",
1375
+ loading: i.confirmLoading,
1376
+ disabled: i.confirmLoading,
1377
+ onClick: u[2] || (u[2] = (l) => a("confirm"))
1378
+ }, {
1379
+ default: C(() => [
1380
+ pe(J(i.confirmText), 1)
1381
+ ]),
1382
+ _: 1
1383
+ }, 8, ["loading", "disabled"])
1384
+ ])
1385
+ ]));
1386
+ }
1387
+ }), ho = /* @__PURE__ */ K(vo, [["__scopeId", "data-v-a1c162dc"]]), go = {
1388
+ title: "数据启用提示",
1389
+ desc: "点击确定后,将启用该条数据",
1390
+ confirmText: W("common.确认"),
1391
+ cancelText: W("common.取消")
1392
+ };
1393
+ function Vo(c = {}) {
1394
+ const t = { ...go, ...c };
1395
+ return ft({
1396
+ message: ({ confirm: a, cancel: i }) => {
1397
+ const u = R({
1398
+ name: "JtConfirmDialogMessage",
1399
+ setup() {
1400
+ const l = H(!1), s = async () => {
1401
+ if (!l.value) {
1402
+ l.value = !0;
1403
+ try {
1404
+ await t.onConfirm?.(), a();
1405
+ } finally {
1406
+ l.value = !1;
1407
+ }
1408
+ }
1409
+ };
1410
+ return () => ze(
1411
+ ho,
1412
+ {
1413
+ title: t.title,
1414
+ desc: t.desc,
1415
+ confirmText: t.confirmText,
1416
+ cancelText: t.cancelText,
1417
+ confirmLoading: l.value,
1418
+ onClose: i,
1419
+ onConfirm: s
1420
+ },
1421
+ t.content ? { default: t.content } : void 0
1422
+ );
1423
+ }
1424
+ });
1425
+ return ze(u);
1426
+ },
1427
+ customClass: "jt-confirm-message-box-host",
1428
+ customStyle: {
1429
+ width: "517px",
1430
+ maxWidth: "calc(100vw - 40px)"
1431
+ },
1432
+ showClose: !1,
1433
+ showConfirmButton: !1,
1434
+ showCancelButton: !1,
1435
+ distinguishCancelAndClose: !0
1436
+ }).then(() => "confirm").catch(() => {
1437
+ throw t.onClose?.(), Error("close 用户手动关闭");
1438
+ });
1439
+ }
1440
+ const Fe = Symbol("JtTabContext"), yo = {
1441
+ key: 0,
1442
+ class: "jt-tab__extra"
1443
+ }, bo = 4, _o = /* @__PURE__ */ R({
1444
+ name: "JtTab",
1445
+ __name: "index",
1446
+ props: {
1447
+ modelValue: {},
1448
+ type: { default: "line" },
1449
+ size: { default: "default" },
1450
+ inset: { type: Boolean }
1451
+ },
1452
+ emits: ["update:modelValue", "change"],
1453
+ setup(c, { emit: t }) {
1454
+ const a = c, i = t, u = oe(), l = r(() => a.modelValue), s = r(() => a.type), m = r(() => a.size), n = H(), d = H(!1), g = H(!1), b = r(() => [
1455
+ `jt-tab--type-${a.type}`,
1456
+ `jt-tab--size-${a.size}`,
1457
+ { "jt-tab--inset": a.type === "line" && a.inset !== !1 }
1458
+ ]);
1459
+ let z = 0, V = 0, _ = !1, o = null, E;
1460
+ function k(v) {
1461
+ v !== a.modelValue && (i("update:modelValue", v), i("change", v));
1462
+ }
1463
+ ut(Fe, {
1464
+ modelValue: l,
1465
+ type: s,
1466
+ size: m,
1467
+ activate: k
1468
+ });
1469
+ function q() {
1470
+ const v = n.value, D = !!(v && v.scrollWidth > v.clientWidth);
1471
+ return d.value = D, D;
1472
+ }
1473
+ function w(v) {
1474
+ const D = n.value;
1475
+ if (!D || !q()) return !1;
1476
+ const U = D.querySelector(
1477
+ '[data-jt-tab-item="true"][aria-selected="true"]'
1478
+ );
1479
+ if (!U) return !1;
1480
+ const N = U.offsetLeft - (D.clientWidth - U.offsetWidth) / 2, Q = D.scrollWidth - D.clientWidth, ae = Math.min(Math.max(N, 0), Q);
1481
+ return D.scrollTo({ left: ae, behavior: v }), !0;
1482
+ }
1483
+ async function M(v) {
1484
+ await Oe(), w(v);
1485
+ }
1486
+ function f(v) {
1487
+ v && o !== null && v.pointerId !== o || (window.removeEventListener("pointermove", p), window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", f), o = null, g.value = !1);
1488
+ }
1489
+ function p(v) {
1490
+ const D = n.value;
1491
+ if (!D || o !== v.pointerId) return;
1492
+ if (v.pointerType === "mouse" && v.buttons !== 1) {
1493
+ f(v);
1494
+ return;
1495
+ }
1496
+ const U = v.clientX - z;
1497
+ !_ && Math.abs(U) < bo || (_ = !0, g.value = !0, D.scrollLeft = V - U, v.preventDefault());
1498
+ }
1499
+ function $(v) {
1500
+ const D = n.value;
1501
+ v.pointerType === "mouse" && (v.button !== 0 || v.buttons !== 1) || !D || !q() || (o = v.pointerId, z = v.clientX, V = D.scrollLeft, _ = !1, g.value = !0, window.addEventListener("pointermove", p), window.addEventListener("pointerup", f), window.addEventListener("pointercancel", f));
1502
+ }
1503
+ function T(v) {
1504
+ _ && (v.preventDefault(), v.stopPropagation(), _ = !1);
1505
+ }
1506
+ function j(v) {
1507
+ const U = {
1508
+ ArrowRight: 1,
1509
+ ArrowDown: 1,
1510
+ ArrowLeft: -1,
1511
+ ArrowUp: -1
1512
+ }[v.key], N = v.key === "Home", Q = v.key === "End";
1513
+ if (!U && !N && !Q) return;
1514
+ const ae = v.currentTarget, G = Array.from(
1515
+ ae.querySelectorAll(
1516
+ '[data-jt-tab-item="true"]:not([aria-disabled="true"])'
1517
+ )
1518
+ ), fe = G.findIndex(
1519
+ (ve) => ve === document.activeElement
1520
+ );
1521
+ if (!G.length) return;
1522
+ v.preventDefault();
1523
+ const se = N ? 0 : Q ? G.length - 1 : (Math.max(fe, 0) + U + G.length) % G.length, ie = G[se];
1524
+ ie?.focus(), ie?.click();
1525
+ }
1526
+ return ce(
1527
+ () => a.modelValue,
1528
+ () => {
1529
+ M("smooth");
1530
+ }
1531
+ ), ct(() => {
1532
+ q(), M("auto"), !(typeof ResizeObserver > "u" || !n.value) && (E = new ResizeObserver(() => {
1533
+ q(), M("auto");
1534
+ }), E.observe(n.value));
1535
+ }), dt(() => {
1536
+ f(), E?.disconnect();
1537
+ }), (v, D) => (h(), L("div", F({
1538
+ class: ["jt-tab", b.value],
1539
+ role: "tablist"
1540
+ }, v.$attrs, { onKeydown: j }), [
1541
+ S("div", {
1542
+ ref_key: "listRef",
1543
+ ref: n,
1544
+ class: de(["jt-tab__list", {
1545
+ "is-scrollable": d.value,
1546
+ "is-dragging": g.value
1547
+ }]),
1548
+ onPointerdown: $,
1549
+ onClickCapture: T
1550
+ }, [
1551
+ B(v.$slots, "default", {}, void 0, !0)
1552
+ ], 34),
1553
+ x(u).extra ? (h(), L("div", yo, [
1554
+ B(v.$slots, "extra", {}, void 0, !0)
1555
+ ])) : A("", !0)
1556
+ ], 16));
1557
+ }
1558
+ }), Oo = /* @__PURE__ */ K(_o, [["__scopeId", "data-v-28d7f01e"]]), Co = ["aria-selected", "aria-disabled", "tabindex", "disabled", "onKeydown"], wo = /* @__PURE__ */ R({
1559
+ name: "JtTabItem",
1560
+ __name: "JtTabItem",
1561
+ props: {
1562
+ value: {},
1563
+ disabled: { type: Boolean, default: !1 }
1564
+ },
1565
+ setup(c) {
1566
+ const t = c, a = pt(Fe, null), i = r(() => a?.modelValue.value === t.value), u = r(() => t.disabled || !a), l = r(() => a?.type.value ?? "line"), s = r(() => a?.size.value ?? "default"), m = r(() => u.value ? -1 : i.value ? 0 : -1), n = r(() => [
1567
+ `jt-tab__item--type-${l.value}`,
1568
+ `jt-tab__item--size-${s.value}`,
1569
+ {
1570
+ "is-active": i.value,
1571
+ "is-disabled": u.value
1572
+ }
1573
+ ]);
1574
+ function d() {
1575
+ u.value || a?.activate(t.value);
1576
+ }
1577
+ return (g, b) => (h(), L("button", {
1578
+ class: de(["jt-tab__item", n.value]),
1579
+ type: "button",
1580
+ role: "tab",
1581
+ "data-jt-tab-item": "true",
1582
+ "aria-selected": i.value,
1583
+ "aria-disabled": u.value || void 0,
1584
+ tabindex: m.value,
1585
+ disabled: u.value,
1586
+ onClick: d,
1587
+ onKeydown: [
1588
+ we($e(d, ["prevent"]), ["enter"]),
1589
+ we($e(d, ["prevent"]), ["space"])
1590
+ ]
1591
+ }, [
1592
+ B(g.$slots, "default", {}, void 0, !0)
1593
+ ], 42, Co));
1594
+ }
1595
+ }), Jo = /* @__PURE__ */ K(wo, [["__scopeId", "data-v-9da03600"]]), Bo = { class: "jt-page-header__title" }, $o = { key: 0 }, jo = { key: 2 }, So = {
1596
+ key: 0,
1597
+ class: "jt-page-header__description"
1598
+ }, ko = {
1599
+ key: 0,
1600
+ class: "jt-page-header__operates"
1601
+ }, To = /* @__PURE__ */ R({
1602
+ name: "JtPageHeader",
1603
+ __name: "index",
1604
+ props: {
1605
+ size: { default: "large" },
1606
+ gray: { type: Boolean, default: !0 },
1607
+ title: {},
1608
+ description: {},
1609
+ operates: { default: () => [] }
1610
+ },
1611
+ emits: ["operate-click"],
1612
+ setup(c, { emit: t }) {
1613
+ const a = c, i = t, u = oe(), l = r(() => a.operates.length > 0 || !!u.operates), s = r(() => [
1614
+ `jt-page-header--size-${a.size}`,
1615
+ { "jt-page-header--gray": a.gray }
1616
+ ]);
1617
+ function m(n, d) {
1618
+ n.onClick?.(n, d), i("operate-click", n, d);
1619
+ }
1620
+ return (n, d) => (h(), L("div", F({
1621
+ class: ["jt-page-header", s.value]
1622
+ }, n.$attrs), [
1623
+ S("div", Bo, [
1624
+ x(u).title ? B(n.$slots, "title", { key: 0 }, () => [
1625
+ n.title ? (h(), L("span", $o, J(n.title), 1)) : A("", !0)
1626
+ ], !0) : x(u).default ? B(n.$slots, "default", { key: 1 }, void 0, !0) : n.title ? (h(), L("span", jo, J(n.title), 1)) : A("", !0),
1627
+ B(n.$slots, "description", {}, () => [
1628
+ n.description ? (h(), L("span", So, J(n.description), 1)) : A("", !0)
1629
+ ], !0)
1630
+ ]),
1631
+ l.value ? (h(), L("div", ko, [
1632
+ B(n.$slots, "operates", { operates: n.operates }, () => [
1633
+ (h(!0), L(me, null, Y(n.operates, (g) => (h(), I(x(X), F({
1634
+ key: g.key ?? g.label,
1635
+ ref_for: !0
1636
+ }, g.buttonProps, {
1637
+ type: g.type,
1638
+ disabled: g.disabled,
1639
+ loading: g.loading,
1640
+ plain: g.plain,
1641
+ text: g.text,
1642
+ link: g.link,
1643
+ icon: g.icon,
1644
+ onClick: (b) => m(g, b)
1645
+ }), {
1646
+ default: C(() => [
1647
+ S("span", null, J(g.label), 1)
1648
+ ]),
1649
+ _: 2
1650
+ }, 1040, ["type", "disabled", "loading", "plain", "text", "link", "icon", "onClick"]))), 128))
1651
+ ], !0)
1652
+ ])) : A("", !0)
1653
+ ], 16));
1654
+ }
1655
+ }), Fo = /* @__PURE__ */ K(To, [["__scopeId", "data-v-6a07348f"]]);
1656
+ export {
1657
+ X as JtButton,
1658
+ Mo as JtCard,
1659
+ Ct as JtCascader,
1660
+ Io as JtCrudTable,
1661
+ Bt as JtDatePicker,
1662
+ Do as JtDrawer,
1663
+ Ot as JtFilterBar,
1664
+ Tt as JtFormItems,
1665
+ Ce as JtInput,
1666
+ Fo as JtPageHeader,
1667
+ qt as JtPagination,
1668
+ St as JtSelect,
1669
+ Oo as JtTab,
1670
+ Jo as JtTabItem,
1671
+ Wt as JtTable,
1672
+ Wo as getJtLocale,
1673
+ Ho as install,
1674
+ Ko as installLocale,
1675
+ Uo as normalizeLocale,
1676
+ Vo as openJtConfirmDialog,
1677
+ qo as resetJtLocale,
1678
+ No as setJtLocale
1679
+ };