knt-shared 1.4.8 → 1.4.9

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.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { getCurrentInstance, inject, defineComponent, computed, createElementBlock, openBlock, normalizeStyle, normalizeClass, createElementVNode, resolveComponent, createCommentVNode, createVNode, createBlock, unref, reactive, Fragment, renderList, withModifiers, ref, watch, onMounted, onUnmounted, withDirectives, vModelText, vShow, toDisplayString, withCtx, createTextVNode, useCssVars, nextTick, mergeProps, createSlots, renderSlot, h, resolveDynamicComponent, onBeforeUnmount, normalizeProps, guardReactiveProps, useSlots } from "vue";
1
+ import { getCurrentInstance, inject, defineComponent, computed, createElementBlock, openBlock, normalizeStyle, normalizeClass, createElementVNode, resolveComponent, createCommentVNode, createVNode, createBlock, unref, reactive, Fragment, renderList, withModifiers, ref, watch, onMounted, onUnmounted, withDirectives, vModelText, vShow, toDisplayString, withCtx, createTextVNode, useCssVars, nextTick, mergeProps, createSlots, renderSlot, onBeforeUnmount, toRef, normalizeProps, guardReactiveProps, h, resolveDynamicComponent, useSlots } from "vue";
2
2
  import { Message, Transfer, Mention, Upload, Rate, Slider, Switch, RangePicker, TimePicker, DatePicker, TreeSelect, Cascader, CheckboxGroup, Checkbox, RadioGroup, Radio, Select, AutoComplete, Textarea, InputPassword, InputNumber, Input, ImagePreviewGroup, Image } from "@arco-design/web-vue";
3
3
  const configProviderInjectionKey = Symbol("ArcoConfigProvider");
4
4
  const CLASS_PREFIX = "arco";
@@ -22,7 +22,7 @@ var _export_sfc$1 = (sfc, props) => {
22
22
  }
23
23
  return sfc;
24
24
  };
25
- const _sfc_main$q = defineComponent({
25
+ const _sfc_main$u = defineComponent({
26
26
  name: "IconExclamationCircle",
27
27
  props: {
28
28
  size: {
@@ -75,8 +75,8 @@ const _sfc_main$q = defineComponent({
75
75
  };
76
76
  }
77
77
  });
78
- const _hoisted_1$o = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
79
- function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
78
+ const _hoisted_1$q = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
79
+ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
80
80
  return openBlock(), createElementBlock("svg", {
81
81
  viewBox: "0 0 48 48",
82
82
  fill: "none",
@@ -90,9 +90,9 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
90
90
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
91
91
  }, _cache[1] || (_cache[1] = [
92
92
  createElementVNode("path", { d: "M24 28V14m0 16v4M6 24c0-9.941 8.059-18 18-18s18 8.059 18 18-8.059 18-18 18S6 33.941 6 24Z" }, null, -1)
93
- ]), 14, _hoisted_1$o);
93
+ ]), 14, _hoisted_1$q);
94
94
  }
95
- var _IconExclamationCircle = /* @__PURE__ */ _export_sfc$1(_sfc_main$q, [["render", _sfc_render$e]]);
95
+ var _IconExclamationCircle = /* @__PURE__ */ _export_sfc$1(_sfc_main$u, [["render", _sfc_render$g]]);
96
96
  const IconExclamationCircle = Object.assign(_IconExclamationCircle, {
97
97
  install: (app, options) => {
98
98
  var _a;
@@ -100,7 +100,7 @@ const IconExclamationCircle = Object.assign(_IconExclamationCircle, {
100
100
  app.component(iconPrefix + _IconExclamationCircle.name, _IconExclamationCircle);
101
101
  }
102
102
  });
103
- const _sfc_main$p = defineComponent({
103
+ const _sfc_main$t = defineComponent({
104
104
  name: "IconPlus",
105
105
  props: {
106
106
  size: {
@@ -153,8 +153,8 @@ const _sfc_main$p = defineComponent({
153
153
  };
154
154
  }
155
155
  });
156
- const _hoisted_1$n = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
157
- function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
156
+ const _hoisted_1$p = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
157
+ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
158
158
  return openBlock(), createElementBlock("svg", {
159
159
  viewBox: "0 0 48 48",
160
160
  fill: "none",
@@ -168,9 +168,9 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
168
168
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
169
169
  }, _cache[1] || (_cache[1] = [
170
170
  createElementVNode("path", { d: "M5 24h38M24 5v38" }, null, -1)
171
- ]), 14, _hoisted_1$n);
171
+ ]), 14, _hoisted_1$p);
172
172
  }
173
- var _IconPlus = /* @__PURE__ */ _export_sfc$1(_sfc_main$p, [["render", _sfc_render$d]]);
173
+ var _IconPlus = /* @__PURE__ */ _export_sfc$1(_sfc_main$t, [["render", _sfc_render$f]]);
174
174
  const IconPlus = Object.assign(_IconPlus, {
175
175
  install: (app, options) => {
176
176
  var _a;
@@ -178,7 +178,7 @@ const IconPlus = Object.assign(_IconPlus, {
178
178
  app.component(iconPrefix + _IconPlus.name, _IconPlus);
179
179
  }
180
180
  });
181
- const _sfc_main$o = defineComponent({
181
+ const _sfc_main$s = defineComponent({
182
182
  name: "IconQuestionCircle",
183
183
  props: {
184
184
  size: {
@@ -231,8 +231,8 @@ const _sfc_main$o = defineComponent({
231
231
  };
232
232
  }
233
233
  });
234
- const _hoisted_1$m = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
235
- function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
234
+ const _hoisted_1$o = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
235
+ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
236
236
  return openBlock(), createElementBlock("svg", {
237
237
  viewBox: "0 0 48 48",
238
238
  fill: "none",
@@ -247,9 +247,9 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
247
247
  }, _cache[1] || (_cache[1] = [
248
248
  createElementVNode("path", { d: "M42 24c0 9.941-8.059 18-18 18S6 33.941 6 24 14.059 6 24 6s18 8.059 18 18Z" }, null, -1),
249
249
  createElementVNode("path", { d: "M24.006 31v4.008m0-6.008L24 28c0-3 3-4 4.78-6.402C30.558 19.195 28.288 15 23.987 15c-4.014 0-5.382 2.548-5.388 4.514v.465" }, null, -1)
250
- ]), 14, _hoisted_1$m);
250
+ ]), 14, _hoisted_1$o);
251
251
  }
252
- var _IconQuestionCircle = /* @__PURE__ */ _export_sfc$1(_sfc_main$o, [["render", _sfc_render$c]]);
252
+ var _IconQuestionCircle = /* @__PURE__ */ _export_sfc$1(_sfc_main$s, [["render", _sfc_render$e]]);
253
253
  const IconQuestionCircle = Object.assign(_IconQuestionCircle, {
254
254
  install: (app, options) => {
255
255
  var _a;
@@ -257,7 +257,7 @@ const IconQuestionCircle = Object.assign(_IconQuestionCircle, {
257
257
  app.component(iconPrefix + _IconQuestionCircle.name, _IconQuestionCircle);
258
258
  }
259
259
  });
260
- const _sfc_main$n = defineComponent({
260
+ const _sfc_main$r = defineComponent({
261
261
  name: "IconEye",
262
262
  props: {
263
263
  size: {
@@ -310,8 +310,8 @@ const _sfc_main$n = defineComponent({
310
310
  };
311
311
  }
312
312
  });
313
- const _hoisted_1$l = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
314
- function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
313
+ const _hoisted_1$n = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
314
+ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
315
315
  return openBlock(), createElementBlock("svg", {
316
316
  viewBox: "0 0 48 48",
317
317
  fill: "none",
@@ -329,9 +329,9 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
329
329
  d: "M24 37c6.627 0 12.627-4.333 18-13-5.373-8.667-11.373-13-18-13-6.627 0-12.627 4.333-18 13 5.373 8.667 11.373 13 18 13Z"
330
330
  }, null, -1),
331
331
  createElementVNode("path", { d: "M29 24a5 5 0 1 1-10 0 5 5 0 0 1 10 0Z" }, null, -1)
332
- ]), 14, _hoisted_1$l);
332
+ ]), 14, _hoisted_1$n);
333
333
  }
334
- var _IconEye = /* @__PURE__ */ _export_sfc$1(_sfc_main$n, [["render", _sfc_render$b]]);
334
+ var _IconEye = /* @__PURE__ */ _export_sfc$1(_sfc_main$r, [["render", _sfc_render$d]]);
335
335
  const IconEye = Object.assign(_IconEye, {
336
336
  install: (app, options) => {
337
337
  var _a;
@@ -339,7 +339,90 @@ const IconEye = Object.assign(_IconEye, {
339
339
  app.component(iconPrefix + _IconEye.name, _IconEye);
340
340
  }
341
341
  });
342
- const _sfc_main$m = defineComponent({
342
+ const _sfc_main$q = defineComponent({
343
+ name: "IconMore",
344
+ props: {
345
+ size: {
346
+ type: [Number, String]
347
+ },
348
+ strokeWidth: {
349
+ type: Number,
350
+ default: 4
351
+ },
352
+ strokeLinecap: {
353
+ type: String,
354
+ default: "butt",
355
+ validator: (value) => {
356
+ return ["butt", "round", "square"].includes(value);
357
+ }
358
+ },
359
+ strokeLinejoin: {
360
+ type: String,
361
+ default: "miter",
362
+ validator: (value) => {
363
+ return ["arcs", "bevel", "miter", "miter-clip", "round"].includes(value);
364
+ }
365
+ },
366
+ rotate: Number,
367
+ spin: Boolean
368
+ },
369
+ emits: {
370
+ click: (ev) => true
371
+ },
372
+ setup(props, { emit }) {
373
+ const prefixCls = getPrefixCls("icon");
374
+ const cls = computed(() => [prefixCls, `${prefixCls}-more`, { [`${prefixCls}-spin`]: props.spin }]);
375
+ const innerStyle = computed(() => {
376
+ const styles = {};
377
+ if (props.size) {
378
+ styles.fontSize = isNumber(props.size) ? `${props.size}px` : props.size;
379
+ }
380
+ if (props.rotate) {
381
+ styles.transform = `rotate(${props.rotate}deg)`;
382
+ }
383
+ return styles;
384
+ });
385
+ const onClick = (ev) => {
386
+ emit("click", ev);
387
+ };
388
+ return {
389
+ cls,
390
+ innerStyle,
391
+ onClick
392
+ };
393
+ }
394
+ });
395
+ const _hoisted_1$m = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
396
+ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
397
+ return openBlock(), createElementBlock("svg", {
398
+ viewBox: "0 0 48 48",
399
+ fill: "none",
400
+ xmlns: "http://www.w3.org/2000/svg",
401
+ stroke: "currentColor",
402
+ class: normalizeClass(_ctx.cls),
403
+ style: normalizeStyle(_ctx.innerStyle),
404
+ "stroke-width": _ctx.strokeWidth,
405
+ "stroke-linecap": _ctx.strokeLinecap,
406
+ "stroke-linejoin": _ctx.strokeLinejoin,
407
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
408
+ }, _cache[1] || (_cache[1] = [
409
+ createElementVNode("path", {
410
+ d: "M38 25v-2h2v2h-2ZM23 25v-2h2v2h-2ZM8 25v-2h2v2H8Z",
411
+ fill: "currentColor",
412
+ stroke: "none"
413
+ }, null, -1),
414
+ createElementVNode("path", { d: "M38 25v-2h2v2h-2ZM23 25v-2h2v2h-2ZM8 25v-2h2v2H8Z" }, null, -1)
415
+ ]), 14, _hoisted_1$m);
416
+ }
417
+ var _IconMore = /* @__PURE__ */ _export_sfc$1(_sfc_main$q, [["render", _sfc_render$c]]);
418
+ const IconMore = Object.assign(_IconMore, {
419
+ install: (app, options) => {
420
+ var _a;
421
+ const iconPrefix = (_a = options == null ? void 0 : options.iconPrefix) != null ? _a : "";
422
+ app.component(iconPrefix + _IconMore.name, _IconMore);
423
+ }
424
+ });
425
+ const _sfc_main$p = defineComponent({
343
426
  name: "IconRefresh",
344
427
  props: {
345
428
  size: {
@@ -392,8 +475,8 @@ const _sfc_main$m = defineComponent({
392
475
  };
393
476
  }
394
477
  });
395
- const _hoisted_1$k = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
396
- function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
478
+ const _hoisted_1$l = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
479
+ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
397
480
  return openBlock(), createElementBlock("svg", {
398
481
  viewBox: "0 0 48 48",
399
482
  fill: "none",
@@ -407,9 +490,9 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
407
490
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
408
491
  }, _cache[1] || (_cache[1] = [
409
492
  createElementVNode("path", { d: "M38.837 18C36.463 12.136 30.715 8 24 8 15.163 8 8 15.163 8 24s7.163 16 16 16c7.455 0 13.72-5.1 15.496-12M40 8v10H30" }, null, -1)
410
- ]), 14, _hoisted_1$k);
493
+ ]), 14, _hoisted_1$l);
411
494
  }
412
- var _IconRefresh = /* @__PURE__ */ _export_sfc$1(_sfc_main$m, [["render", _sfc_render$a]]);
495
+ var _IconRefresh = /* @__PURE__ */ _export_sfc$1(_sfc_main$p, [["render", _sfc_render$b]]);
413
496
  const IconRefresh = Object.assign(_IconRefresh, {
414
497
  install: (app, options) => {
415
498
  var _a;
@@ -417,7 +500,7 @@ const IconRefresh = Object.assign(_IconRefresh, {
417
500
  app.component(iconPrefix + _IconRefresh.name, _IconRefresh);
418
501
  }
419
502
  });
420
- const _sfc_main$l = defineComponent({
503
+ const _sfc_main$o = defineComponent({
421
504
  name: "IconSettings",
422
505
  props: {
423
506
  size: {
@@ -470,8 +553,8 @@ const _sfc_main$l = defineComponent({
470
553
  };
471
554
  }
472
555
  });
473
- const _hoisted_1$j = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
474
- function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
556
+ const _hoisted_1$k = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
557
+ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
475
558
  return openBlock(), createElementBlock("svg", {
476
559
  viewBox: "0 0 48 48",
477
560
  fill: "none",
@@ -486,9 +569,9 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
486
569
  }, _cache[1] || (_cache[1] = [
487
570
  createElementVNode("path", { d: "M18.797 6.732A1 1 0 0 1 19.76 6h8.48a1 1 0 0 1 .964.732l1.285 4.628a1 1 0 0 0 1.213.7l4.651-1.2a1 1 0 0 1 1.116.468l4.24 7.344a1 1 0 0 1-.153 1.2L38.193 23.3a1 1 0 0 0 0 1.402l3.364 3.427a1 1 0 0 1 .153 1.2l-4.24 7.344a1 1 0 0 1-1.116.468l-4.65-1.2a1 1 0 0 0-1.214.7l-1.285 4.628a1 1 0 0 1-.964.732h-8.48a1 1 0 0 1-.963-.732L17.51 36.64a1 1 0 0 0-1.213-.7l-4.65 1.2a1 1 0 0 1-1.116-.468l-4.24-7.344a1 1 0 0 1 .153-1.2L9.809 24.7a1 1 0 0 0 0-1.402l-3.364-3.427a1 1 0 0 1-.153-1.2l4.24-7.344a1 1 0 0 1 1.116-.468l4.65 1.2a1 1 0 0 0 1.213-.7l1.286-4.628Z" }, null, -1),
488
571
  createElementVNode("path", { d: "M30 24a6 6 0 1 1-12 0 6 6 0 0 1 12 0Z" }, null, -1)
489
- ]), 14, _hoisted_1$j);
572
+ ]), 14, _hoisted_1$k);
490
573
  }
491
- var _IconSettings = /* @__PURE__ */ _export_sfc$1(_sfc_main$l, [["render", _sfc_render$9]]);
574
+ var _IconSettings = /* @__PURE__ */ _export_sfc$1(_sfc_main$o, [["render", _sfc_render$a]]);
492
575
  const IconSettings = Object.assign(_IconSettings, {
493
576
  install: (app, options) => {
494
577
  var _a;
@@ -496,7 +579,7 @@ const IconSettings = Object.assign(_IconSettings, {
496
579
  app.component(iconPrefix + _IconSettings.name, _IconSettings);
497
580
  }
498
581
  });
499
- const _sfc_main$k = defineComponent({
582
+ const _sfc_main$n = defineComponent({
500
583
  name: "IconUpload",
501
584
  props: {
502
585
  size: {
@@ -549,8 +632,8 @@ const _sfc_main$k = defineComponent({
549
632
  };
550
633
  }
551
634
  });
552
- const _hoisted_1$i = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
553
- function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
635
+ const _hoisted_1$j = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
636
+ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
554
637
  return openBlock(), createElementBlock("svg", {
555
638
  viewBox: "0 0 48 48",
556
639
  fill: "none",
@@ -564,9 +647,9 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
564
647
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
565
648
  }, _cache[1] || (_cache[1] = [
566
649
  createElementVNode("path", { d: "M14.93 17.071 24.001 8l9.071 9.071m-9.07 16.071v-25M40 35v6H8v-6" }, null, -1)
567
- ]), 14, _hoisted_1$i);
650
+ ]), 14, _hoisted_1$j);
568
651
  }
569
- var _IconUpload = /* @__PURE__ */ _export_sfc$1(_sfc_main$k, [["render", _sfc_render$8]]);
652
+ var _IconUpload = /* @__PURE__ */ _export_sfc$1(_sfc_main$n, [["render", _sfc_render$9]]);
570
653
  const IconUpload = Object.assign(_IconUpload, {
571
654
  install: (app, options) => {
572
655
  var _a;
@@ -574,7 +657,7 @@ const IconUpload = Object.assign(_IconUpload, {
574
657
  app.component(iconPrefix + _IconUpload.name, _IconUpload);
575
658
  }
576
659
  });
577
- const _sfc_main$j = defineComponent({
660
+ const _sfc_main$m = defineComponent({
578
661
  name: "IconDelete",
579
662
  props: {
580
663
  size: {
@@ -627,8 +710,8 @@ const _sfc_main$j = defineComponent({
627
710
  };
628
711
  }
629
712
  });
630
- const _hoisted_1$h = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
631
- function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
713
+ const _hoisted_1$i = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
714
+ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
632
715
  return openBlock(), createElementBlock("svg", {
633
716
  viewBox: "0 0 48 48",
634
717
  fill: "none",
@@ -642,9 +725,9 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
642
725
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
643
726
  }, _cache[1] || (_cache[1] = [
644
727
  createElementVNode("path", { d: "M5 11h5.5m0 0v29a1 1 0 0 0 1 1h25a1 1 0 0 0 1-1V11m-27 0H16m21.5 0H43m-5.5 0H32m-16 0V7h16v4m-16 0h16M20 18v15m8-15v15" }, null, -1)
645
- ]), 14, _hoisted_1$h);
728
+ ]), 14, _hoisted_1$i);
646
729
  }
647
- var _IconDelete = /* @__PURE__ */ _export_sfc$1(_sfc_main$j, [["render", _sfc_render$7]]);
730
+ var _IconDelete = /* @__PURE__ */ _export_sfc$1(_sfc_main$m, [["render", _sfc_render$8]]);
648
731
  const IconDelete = Object.assign(_IconDelete, {
649
732
  install: (app, options) => {
650
733
  var _a;
@@ -652,7 +735,7 @@ const IconDelete = Object.assign(_IconDelete, {
652
735
  app.component(iconPrefix + _IconDelete.name, _IconDelete);
653
736
  }
654
737
  });
655
- const _sfc_main$i = defineComponent({
738
+ const _sfc_main$l = defineComponent({
656
739
  name: "IconLineHeight",
657
740
  props: {
658
741
  size: {
@@ -705,8 +788,8 @@ const _sfc_main$i = defineComponent({
705
788
  };
706
789
  }
707
790
  });
708
- const _hoisted_1$g = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
709
- function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
791
+ const _hoisted_1$h = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
792
+ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
710
793
  return openBlock(), createElementBlock("svg", {
711
794
  viewBox: "0 0 48 48",
712
795
  fill: "none",
@@ -726,9 +809,9 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
726
809
  stroke: "none"
727
810
  }, null, -1),
728
811
  createElementVNode("path", { d: "M39 13h2l-2-3.5-2 3.5h2Zm0 0v22m0 0h2l-2 3.5-2-3.5h2Z" }, null, -1)
729
- ]), 14, _hoisted_1$g);
812
+ ]), 14, _hoisted_1$h);
730
813
  }
731
- var _IconLineHeight = /* @__PURE__ */ _export_sfc$1(_sfc_main$i, [["render", _sfc_render$6]]);
814
+ var _IconLineHeight = /* @__PURE__ */ _export_sfc$1(_sfc_main$l, [["render", _sfc_render$7]]);
732
815
  const IconLineHeight = Object.assign(_IconLineHeight, {
733
816
  install: (app, options) => {
734
817
  var _a;
@@ -736,7 +819,7 @@ const IconLineHeight = Object.assign(_IconLineHeight, {
736
819
  app.component(iconPrefix + _IconLineHeight.name, _IconLineHeight);
737
820
  }
738
821
  });
739
- const _sfc_main$h = defineComponent({
822
+ const _sfc_main$k = defineComponent({
740
823
  name: "IconFullscreenExit",
741
824
  props: {
742
825
  size: {
@@ -789,8 +872,8 @@ const _sfc_main$h = defineComponent({
789
872
  };
790
873
  }
791
874
  });
792
- const _hoisted_1$f = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
793
- function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
875
+ const _hoisted_1$g = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
876
+ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
794
877
  return openBlock(), createElementBlock("svg", {
795
878
  viewBox: "0 0 48 48",
796
879
  fill: "none",
@@ -804,9 +887,9 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
804
887
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
805
888
  }, _cache[1] || (_cache[1] = [
806
889
  createElementVNode("path", { d: "M35 6v8a1 1 0 0 0 1 1h8M13 6v8a1 1 0 0 1-1 1H4m31 27v-8a1 1 0 0 1 1-1h8m-31 9v-8a1 1 0 0 0-1-1H4" }, null, -1)
807
- ]), 14, _hoisted_1$f);
890
+ ]), 14, _hoisted_1$g);
808
891
  }
809
- var _IconFullscreenExit = /* @__PURE__ */ _export_sfc$1(_sfc_main$h, [["render", _sfc_render$5]]);
892
+ var _IconFullscreenExit = /* @__PURE__ */ _export_sfc$1(_sfc_main$k, [["render", _sfc_render$6]]);
810
893
  const IconFullscreenExit = Object.assign(_IconFullscreenExit, {
811
894
  install: (app, options) => {
812
895
  var _a;
@@ -814,7 +897,7 @@ const IconFullscreenExit = Object.assign(_IconFullscreenExit, {
814
897
  app.component(iconPrefix + _IconFullscreenExit.name, _IconFullscreenExit);
815
898
  }
816
899
  });
817
- const _sfc_main$g = defineComponent({
900
+ const _sfc_main$j = defineComponent({
818
901
  name: "IconFullscreen",
819
902
  props: {
820
903
  size: {
@@ -867,8 +950,8 @@ const _sfc_main$g = defineComponent({
867
950
  };
868
951
  }
869
952
  });
870
- const _hoisted_1$e = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
871
- function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
953
+ const _hoisted_1$f = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
954
+ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
872
955
  return openBlock(), createElementBlock("svg", {
873
956
  viewBox: "0 0 48 48",
874
957
  fill: "none",
@@ -882,9 +965,9 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
882
965
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
883
966
  }, _cache[1] || (_cache[1] = [
884
967
  createElementVNode("path", { d: "M42 17V9a1 1 0 0 0-1-1h-8M6 17V9a1 1 0 0 1 1-1h8m27 23v8a1 1 0 0 1-1 1h-8M6 31v8a1 1 0 0 0 1 1h8" }, null, -1)
885
- ]), 14, _hoisted_1$e);
968
+ ]), 14, _hoisted_1$f);
886
969
  }
887
- var _IconFullscreen = /* @__PURE__ */ _export_sfc$1(_sfc_main$g, [["render", _sfc_render$4]]);
970
+ var _IconFullscreen = /* @__PURE__ */ _export_sfc$1(_sfc_main$j, [["render", _sfc_render$5]]);
888
971
  const IconFullscreen = Object.assign(_IconFullscreen, {
889
972
  install: (app, options) => {
890
973
  var _a;
@@ -892,7 +975,7 @@ const IconFullscreen = Object.assign(_IconFullscreen, {
892
975
  app.component(iconPrefix + _IconFullscreen.name, _IconFullscreen);
893
976
  }
894
977
  });
895
- const _sfc_main$f = defineComponent({
978
+ const _sfc_main$i = defineComponent({
896
979
  name: "IconMute",
897
980
  props: {
898
981
  size: {
@@ -945,8 +1028,8 @@ const _sfc_main$f = defineComponent({
945
1028
  };
946
1029
  }
947
1030
  });
948
- const _hoisted_1$d = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
949
- function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
1031
+ const _hoisted_1$e = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
1032
+ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
950
1033
  return openBlock(), createElementBlock("svg", {
951
1034
  viewBox: "0 0 48 48",
952
1035
  fill: "none",
@@ -960,9 +1043,9 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
960
1043
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
961
1044
  }, _cache[1] || (_cache[1] = [
962
1045
  createElementVNode("path", { d: "m19 11.5 4.833-4.35a.1.1 0 0 1 .167.075V17m-14-1H7.1a.1.1 0 0 0-.1.1v15.8a.1.1 0 0 0 .1.1H14l9.833 8.85a.1.1 0 0 0 .167-.075V31m6.071-14.071C32.535 19.393 34 23 32.799 26m2.929-14.728C41.508 17.052 42.5 25 39.123 32M6.5 6.5l35 35" }, null, -1)
963
- ]), 14, _hoisted_1$d);
1046
+ ]), 14, _hoisted_1$e);
964
1047
  }
965
- var _IconMute = /* @__PURE__ */ _export_sfc$1(_sfc_main$f, [["render", _sfc_render$3]]);
1048
+ var _IconMute = /* @__PURE__ */ _export_sfc$1(_sfc_main$i, [["render", _sfc_render$4]]);
966
1049
  const IconMute = Object.assign(_IconMute, {
967
1050
  install: (app, options) => {
968
1051
  var _a;
@@ -970,7 +1053,7 @@ const IconMute = Object.assign(_IconMute, {
970
1053
  app.component(iconPrefix + _IconMute.name, _IconMute);
971
1054
  }
972
1055
  });
973
- const _sfc_main$e = defineComponent({
1056
+ const _sfc_main$h = defineComponent({
974
1057
  name: "IconPause",
975
1058
  props: {
976
1059
  size: {
@@ -1023,8 +1106,8 @@ const _sfc_main$e = defineComponent({
1023
1106
  };
1024
1107
  }
1025
1108
  });
1026
- const _hoisted_1$c = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
1027
- function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
1109
+ const _hoisted_1$d = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
1110
+ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
1028
1111
  return openBlock(), createElementBlock("svg", {
1029
1112
  viewBox: "0 0 48 48",
1030
1113
  fill: "none",
@@ -1043,9 +1126,9 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
1043
1126
  stroke: "none",
1044
1127
  d: "M14 12h4v24h-4zM30 12h4v24h-4z"
1045
1128
  }, null, -1)
1046
- ]), 14, _hoisted_1$c);
1129
+ ]), 14, _hoisted_1$d);
1047
1130
  }
1048
- var _IconPause = /* @__PURE__ */ _export_sfc$1(_sfc_main$e, [["render", _sfc_render$2]]);
1131
+ var _IconPause = /* @__PURE__ */ _export_sfc$1(_sfc_main$h, [["render", _sfc_render$3]]);
1049
1132
  const IconPause = Object.assign(_IconPause, {
1050
1133
  install: (app, options) => {
1051
1134
  var _a;
@@ -1053,7 +1136,7 @@ const IconPause = Object.assign(_IconPause, {
1053
1136
  app.component(iconPrefix + _IconPause.name, _IconPause);
1054
1137
  }
1055
1138
  });
1056
- const _sfc_main$d = defineComponent({
1139
+ const _sfc_main$g = defineComponent({
1057
1140
  name: "IconPlayArrow",
1058
1141
  props: {
1059
1142
  size: {
@@ -1106,8 +1189,8 @@ const _sfc_main$d = defineComponent({
1106
1189
  };
1107
1190
  }
1108
1191
  });
1109
- const _hoisted_1$b = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
1110
- function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
1192
+ const _hoisted_1$c = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
1193
+ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
1111
1194
  return openBlock(), createElementBlock("svg", {
1112
1195
  viewBox: "0 0 48 48",
1113
1196
  fill: "none",
@@ -1121,9 +1204,9 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
1121
1204
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
1122
1205
  }, _cache[1] || (_cache[1] = [
1123
1206
  createElementVNode("path", { d: "M12.533 7.965A1 1 0 0 0 11 8.81v30.377a1 1 0 0 0 1.533.846L36.656 24.84a1 1 0 0 0 0-1.692L12.533 7.965Z" }, null, -1)
1124
- ]), 14, _hoisted_1$b);
1207
+ ]), 14, _hoisted_1$c);
1125
1208
  }
1126
- var _IconPlayArrow = /* @__PURE__ */ _export_sfc$1(_sfc_main$d, [["render", _sfc_render$1]]);
1209
+ var _IconPlayArrow = /* @__PURE__ */ _export_sfc$1(_sfc_main$g, [["render", _sfc_render$2]]);
1127
1210
  const IconPlayArrow = Object.assign(_IconPlayArrow, {
1128
1211
  install: (app, options) => {
1129
1212
  var _a;
@@ -1131,7 +1214,7 @@ const IconPlayArrow = Object.assign(_IconPlayArrow, {
1131
1214
  app.component(iconPrefix + _IconPlayArrow.name, _IconPlayArrow);
1132
1215
  }
1133
1216
  });
1134
- const _sfc_main$c = defineComponent({
1217
+ const _sfc_main$f = defineComponent({
1135
1218
  name: "IconSound",
1136
1219
  props: {
1137
1220
  size: {
@@ -1184,8 +1267,8 @@ const _sfc_main$c = defineComponent({
1184
1267
  };
1185
1268
  }
1186
1269
  });
1187
- const _hoisted_1$a = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
1188
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1270
+ const _hoisted_1$b = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
1271
+ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
1189
1272
  return openBlock(), createElementBlock("svg", {
1190
1273
  viewBox: "0 0 48 48",
1191
1274
  fill: "none",
@@ -1200,9 +1283,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1200
1283
  }, _cache[1] || (_cache[1] = [
1201
1284
  createElementVNode("path", { d: "m14 16 10-9v34l-10-9H6V16h8Z" }, null, -1),
1202
1285
  createElementVNode("path", { d: "M31.071 16.929c3.905 3.905 3.905 10.237 0 14.142M36.727 11.272c7.03 7.03 7.03 18.426 0 25.456" }, null, -1)
1203
- ]), 14, _hoisted_1$a);
1286
+ ]), 14, _hoisted_1$b);
1204
1287
  }
1205
- var _IconSound = /* @__PURE__ */ _export_sfc$1(_sfc_main$c, [["render", _sfc_render]]);
1288
+ var _IconSound = /* @__PURE__ */ _export_sfc$1(_sfc_main$f, [["render", _sfc_render$1]]);
1206
1289
  const IconSound = Object.assign(_IconSound, {
1207
1290
  install: (app, options) => {
1208
1291
  var _a;
@@ -1210,6 +1293,84 @@ const IconSound = Object.assign(_IconSound, {
1210
1293
  app.component(iconPrefix + _IconSound.name, _IconSound);
1211
1294
  }
1212
1295
  });
1296
+ const _sfc_main$e = defineComponent({
1297
+ name: "IconLoading",
1298
+ props: {
1299
+ size: {
1300
+ type: [Number, String]
1301
+ },
1302
+ strokeWidth: {
1303
+ type: Number,
1304
+ default: 4
1305
+ },
1306
+ strokeLinecap: {
1307
+ type: String,
1308
+ default: "butt",
1309
+ validator: (value) => {
1310
+ return ["butt", "round", "square"].includes(value);
1311
+ }
1312
+ },
1313
+ strokeLinejoin: {
1314
+ type: String,
1315
+ default: "miter",
1316
+ validator: (value) => {
1317
+ return ["arcs", "bevel", "miter", "miter-clip", "round"].includes(value);
1318
+ }
1319
+ },
1320
+ rotate: Number,
1321
+ spin: Boolean
1322
+ },
1323
+ emits: {
1324
+ click: (ev) => true
1325
+ },
1326
+ setup(props, { emit }) {
1327
+ const prefixCls = getPrefixCls("icon");
1328
+ const cls = computed(() => [prefixCls, `${prefixCls}-loading`, { [`${prefixCls}-spin`]: props.spin }]);
1329
+ const innerStyle = computed(() => {
1330
+ const styles = {};
1331
+ if (props.size) {
1332
+ styles.fontSize = isNumber(props.size) ? `${props.size}px` : props.size;
1333
+ }
1334
+ if (props.rotate) {
1335
+ styles.transform = `rotate(${props.rotate}deg)`;
1336
+ }
1337
+ return styles;
1338
+ });
1339
+ const onClick = (ev) => {
1340
+ emit("click", ev);
1341
+ };
1342
+ return {
1343
+ cls,
1344
+ innerStyle,
1345
+ onClick
1346
+ };
1347
+ }
1348
+ });
1349
+ const _hoisted_1$a = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
1350
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1351
+ return openBlock(), createElementBlock("svg", {
1352
+ viewBox: "0 0 48 48",
1353
+ fill: "none",
1354
+ xmlns: "http://www.w3.org/2000/svg",
1355
+ stroke: "currentColor",
1356
+ class: normalizeClass(_ctx.cls),
1357
+ style: normalizeStyle(_ctx.innerStyle),
1358
+ "stroke-width": _ctx.strokeWidth,
1359
+ "stroke-linecap": _ctx.strokeLinecap,
1360
+ "stroke-linejoin": _ctx.strokeLinejoin,
1361
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
1362
+ }, _cache[1] || (_cache[1] = [
1363
+ createElementVNode("path", { d: "M42 24c0 9.941-8.059 18-18 18S6 33.941 6 24 14.059 6 24 6" }, null, -1)
1364
+ ]), 14, _hoisted_1$a);
1365
+ }
1366
+ var _IconLoading = /* @__PURE__ */ _export_sfc$1(_sfc_main$e, [["render", _sfc_render]]);
1367
+ const IconLoading = Object.assign(_IconLoading, {
1368
+ install: (app, options) => {
1369
+ var _a;
1370
+ const iconPrefix = (_a = options == null ? void 0 : options.iconPrefix) != null ? _a : "";
1371
+ app.component(iconPrefix + _IconLoading.name, _IconLoading);
1372
+ }
1373
+ });
1213
1374
  const _hoisted_1$9 = ["draggable"];
1214
1375
  const _hoisted_2$7 = ["src", "alt"];
1215
1376
  const _hoisted_3$5 = {
@@ -1225,7 +1386,7 @@ const _hoisted_6$3 = {
1225
1386
  key: 3,
1226
1387
  class: "error-tip"
1227
1388
  };
1228
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
1389
+ const _sfc_main$d = /* @__PURE__ */ defineComponent({
1229
1390
  ...{
1230
1391
  name: "SortableFileItem"
1231
1392
  },
@@ -1323,9 +1484,9 @@ const _export_sfc = (sfc, props) => {
1323
1484
  }
1324
1485
  return target;
1325
1486
  };
1326
- const SortableFileItem = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-f3ec7e11"]]);
1487
+ const SortableFileItem = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-f3ec7e11"]]);
1327
1488
  const _hoisted_1$8 = { class: "sortable-file-list" };
1328
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
1489
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
1329
1490
  ...{
1330
1491
  name: "SortableFileList"
1331
1492
  },
@@ -1410,7 +1571,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
1410
1571
  };
1411
1572
  }
1412
1573
  });
1413
- const SortableFileList = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-1ede8f45"]]);
1574
+ const SortableFileList = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-1ede8f45"]]);
1414
1575
  const _hoisted_1$7 = ["src", "autoplay", "loop", "muted", "preload"];
1415
1576
  const _hoisted_2$6 = {
1416
1577
  key: 0,
@@ -1428,7 +1589,7 @@ const _hoisted_8 = { class: "volume-slider-container" };
1428
1589
  const _hoisted_9 = { class: "time-display" };
1429
1590
  const _hoisted_10 = { class: "controls-right" };
1430
1591
  const _hoisted_11 = { class: "control-button" };
1431
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
1592
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
1432
1593
  ...{
1433
1594
  name: "VideoPreview"
1434
1595
  },
@@ -1777,11 +1938,11 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
1777
1938
  };
1778
1939
  }
1779
1940
  });
1780
- const VideoPreview = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-e8cbf700"]]);
1941
+ const VideoPreview = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-e8cbf700"]]);
1781
1942
  const _hoisted_1$6 = { class: "video-modal-title" };
1782
1943
  const _hoisted_2$5 = { class: "file-name" };
1783
1944
  const _hoisted_3$3 = { class: "video-modal-content" };
1784
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1945
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
1785
1946
  ...{
1786
1947
  name: "VideoPreviewModal"
1787
1948
  },
@@ -1853,7 +2014,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1853
2014
  };
1854
2015
  }
1855
2016
  });
1856
- const VideoPreviewModal = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-0ae4ec5c"]]);
2017
+ const VideoPreviewModal = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-0ae4ec5c"]]);
1857
2018
  const _hoisted_1$5 = { class: "basic-upload" };
1858
2019
  const _hoisted_2$4 = {
1859
2020
  key: 0,
@@ -1876,7 +2037,7 @@ const _hoisted_7$1 = {
1876
2037
  key: 4,
1877
2038
  class: "inline-video-preview"
1878
2039
  };
1879
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2040
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
1880
2041
  ...{
1881
2042
  name: "BasicUpload",
1882
2043
  inheritAttrs: false
@@ -2546,7 +2707,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2546
2707
  };
2547
2708
  }
2548
2709
  });
2549
- const BasicUpload = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-640a0bf9"]]);
2710
+ const BasicUpload = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-640a0bf9"]]);
2550
2711
  function useUpload(props) {
2551
2712
  const uploadRef = ref(null);
2552
2713
  const fileListRef = ref((props == null ? void 0 : props.defaultFileList) || []);
@@ -2592,57 +2753,527 @@ function useUpload(props) {
2592
2753
  upload2.setFileList(files);
2593
2754
  }
2594
2755
  };
2595
- const addFile = (file) => {
2596
- fileListRef.value.push(file);
2597
- const upload2 = getUpload();
2598
- if (upload2.addFile) {
2599
- upload2.addFile(file);
2756
+ const addFile = (file) => {
2757
+ fileListRef.value.push(file);
2758
+ const upload2 = getUpload();
2759
+ if (upload2.addFile) {
2760
+ upload2.addFile(file);
2761
+ }
2762
+ };
2763
+ const removeFile = (fileItem) => {
2764
+ const index = fileListRef.value.findIndex(
2765
+ (item) => item.uid === fileItem.uid
2766
+ );
2767
+ if (index !== -1) {
2768
+ fileListRef.value.splice(index, 1);
2769
+ }
2770
+ const upload2 = getUpload();
2771
+ if (upload2.removeFile) {
2772
+ upload2.removeFile(fileItem);
2773
+ }
2774
+ };
2775
+ const updateFile = (fileItem) => {
2776
+ const index = fileListRef.value.findIndex(
2777
+ (item) => item.uid === fileItem.uid
2778
+ );
2779
+ if (index !== -1) {
2780
+ fileListRef.value[index] = { ...fileListRef.value[index], ...fileItem };
2781
+ }
2782
+ const upload2 = getUpload();
2783
+ if (upload2.updateFile) {
2784
+ upload2.updateFile(fileItem);
2785
+ }
2786
+ };
2787
+ const setProps = (uploadProps) => {
2788
+ getUpload().setProps(uploadProps);
2789
+ };
2790
+ const methods = {
2791
+ get fileList() {
2792
+ return fileListRef.value;
2793
+ },
2794
+ submit,
2795
+ abort,
2796
+ upload,
2797
+ clearFiles,
2798
+ getFileList,
2799
+ setFileList,
2800
+ addFile,
2801
+ removeFile,
2802
+ updateFile,
2803
+ setProps
2804
+ };
2805
+ return [register, methods];
2806
+ }
2807
+ function debounce(func, wait = 300, immediate = false) {
2808
+ let timeout = null;
2809
+ const debounced = function(...args) {
2810
+ const context = this;
2811
+ const later = () => {
2812
+ timeout = null;
2813
+ if (!immediate) {
2814
+ func.apply(context, args);
2815
+ }
2816
+ };
2817
+ const callNow = immediate && !timeout;
2818
+ if (timeout) {
2819
+ clearTimeout(timeout);
2820
+ }
2821
+ timeout = setTimeout(later, wait);
2822
+ if (callNow) {
2823
+ func.apply(context, args);
2824
+ }
2825
+ };
2826
+ debounced.cancel = () => {
2827
+ if (timeout) {
2828
+ clearTimeout(timeout);
2829
+ timeout = null;
2830
+ }
2831
+ };
2832
+ return debounced;
2833
+ }
2834
+ function throttle(func, wait = 300) {
2835
+ let timeout = null;
2836
+ let previous = 0;
2837
+ return function(...args) {
2838
+ const context = this;
2839
+ const now = Date.now();
2840
+ const remaining = wait - (now - previous);
2841
+ if (remaining <= 0 || remaining > wait) {
2842
+ if (timeout) {
2843
+ clearTimeout(timeout);
2844
+ timeout = null;
2845
+ }
2846
+ previous = now;
2847
+ func.apply(context, args);
2848
+ } else if (!timeout) {
2849
+ timeout = setTimeout(() => {
2850
+ previous = Date.now();
2851
+ timeout = null;
2852
+ func.apply(context, args);
2853
+ }, remaining);
2854
+ }
2855
+ };
2856
+ }
2857
+ const cacheMap = /* @__PURE__ */ new Map();
2858
+ function getCacheKey(api, params) {
2859
+ const apiName = api.name || "anonymous";
2860
+ const paramsStr = JSON.stringify(params || {});
2861
+ return `${apiName}_${paramsStr}`;
2862
+ }
2863
+ function getCache(key, cacheTime) {
2864
+ const cache = cacheMap.get(key);
2865
+ if (!cache) return null;
2866
+ if (Date.now() - cache.timestamp > cacheTime) {
2867
+ cacheMap.delete(key);
2868
+ return null;
2869
+ }
2870
+ return cache.data;
2871
+ }
2872
+ function setCache(key, data) {
2873
+ cacheMap.set(key, {
2874
+ data,
2875
+ timestamp: Date.now()
2876
+ });
2877
+ }
2878
+ function getValueByPath(obj, path) {
2879
+ if (!path) return obj;
2880
+ const keys = path.split(".");
2881
+ let result = obj;
2882
+ for (const key of keys) {
2883
+ if (result == null) return void 0;
2884
+ result = result[key];
2885
+ }
2886
+ return result;
2887
+ }
2888
+ function useApiRequest(options) {
2889
+ const {
2890
+ api,
2891
+ params,
2892
+ immediate = true,
2893
+ resultField = "",
2894
+ cacheTime = 5 * 60 * 1e3,
2895
+ // 默认 5 分钟
2896
+ enableCache = true,
2897
+ debounceTime = 300,
2898
+ beforeFetch,
2899
+ afterFetch,
2900
+ onError
2901
+ } = options;
2902
+ const loading = ref(false);
2903
+ const data = ref([]);
2904
+ const isFirstLoad = ref(true);
2905
+ const error = ref(null);
2906
+ async function fetch(forceRefresh = false) {
2907
+ if (!api || typeof api !== "function") {
2908
+ console.warn("[useApiRequest] api 必须是一个函数");
2909
+ return;
2600
2910
  }
2601
- };
2602
- const removeFile = (fileItem) => {
2603
- const index = fileListRef.value.findIndex(
2604
- (item) => item.uid === fileItem.uid
2605
- );
2606
- if (index !== -1) {
2607
- fileListRef.value.splice(index, 1);
2911
+ try {
2912
+ loading.value = true;
2913
+ error.value = null;
2914
+ let fetchParams = unref(params) || {};
2915
+ if (beforeFetch && typeof beforeFetch === "function") {
2916
+ fetchParams = beforeFetch(fetchParams) || fetchParams;
2917
+ }
2918
+ const cacheKey = getCacheKey(api, fetchParams);
2919
+ if (enableCache && !forceRefresh) {
2920
+ const cachedData = getCache(cacheKey, cacheTime);
2921
+ if (cachedData !== null) {
2922
+ data.value = cachedData;
2923
+ loading.value = false;
2924
+ return;
2925
+ }
2926
+ }
2927
+ const res = await api(fetchParams);
2928
+ let resultData;
2929
+ if (Array.isArray(res)) {
2930
+ resultData = res;
2931
+ } else if (resultField) {
2932
+ const extractedData = getValueByPath(res, resultField);
2933
+ resultData = Array.isArray(extractedData) ? extractedData : [];
2934
+ } else {
2935
+ resultData = (res == null ? void 0 : res.data) || (res == null ? void 0 : res.list) || (res == null ? void 0 : res.result) || [];
2936
+ if (!Array.isArray(resultData)) {
2937
+ resultData = [];
2938
+ }
2939
+ }
2940
+ if (afterFetch && typeof afterFetch === "function") {
2941
+ resultData = afterFetch(resultData) || resultData;
2942
+ }
2943
+ data.value = resultData;
2944
+ if (enableCache) {
2945
+ setCache(cacheKey, resultData);
2946
+ }
2947
+ } catch (err) {
2948
+ console.error("[useApiRequest] 请求失败:", err);
2949
+ error.value = err;
2950
+ data.value = [];
2951
+ if (onError && typeof onError === "function") {
2952
+ onError(err);
2953
+ }
2954
+ } finally {
2955
+ loading.value = false;
2608
2956
  }
2609
- const upload2 = getUpload();
2610
- if (upload2.removeFile) {
2611
- upload2.removeFile(fileItem);
2957
+ }
2958
+ const debouncedFetch = debounce(fetch, debounceTime);
2959
+ let stopParamsWatch = null;
2960
+ if (params) {
2961
+ stopParamsWatch = watch(
2962
+ () => unref(params),
2963
+ () => {
2964
+ if (!isFirstLoad.value) {
2965
+ debouncedFetch(true);
2966
+ }
2967
+ },
2968
+ { deep: true }
2969
+ );
2970
+ }
2971
+ if (immediate) {
2972
+ fetch();
2973
+ }
2974
+ if (immediate) {
2975
+ isFirstLoad.value = false;
2976
+ }
2977
+ onBeforeUnmount(() => {
2978
+ if (stopParamsWatch) {
2979
+ stopParamsWatch();
2612
2980
  }
2981
+ debouncedFetch.cancel();
2982
+ data.value = [];
2983
+ });
2984
+ return {
2985
+ /** 加载状态 */
2986
+ loading,
2987
+ /** 数据 */
2988
+ data,
2989
+ /** 错误信息 */
2990
+ error,
2991
+ /** 是否首次加载 */
2992
+ isFirstLoad,
2993
+ /** 执行请求 */
2994
+ fetch,
2995
+ /** 刷新数据(忽略缓存) */
2996
+ refresh: () => fetch(true)
2613
2997
  };
2614
- const updateFile = (fileItem) => {
2615
- const index = fileListRef.value.findIndex(
2616
- (item) => item.uid === fileItem.uid
2998
+ }
2999
+ function clearAllCache() {
3000
+ cacheMap.clear();
3001
+ }
3002
+ function clearApiCache(api, params) {
3003
+ const cacheKey = getCacheKey(api, params);
3004
+ cacheMap.delete(cacheKey);
3005
+ }
3006
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
3007
+ __name: "ApiSelect",
3008
+ props: {
3009
+ modelValue: {},
3010
+ api: {},
3011
+ params: {},
3012
+ immediate: { type: Boolean, default: true },
3013
+ alwaysLoad: { type: Boolean, default: false },
3014
+ resultField: { default: "" },
3015
+ labelField: { default: "label" },
3016
+ valueField: { default: "value" },
3017
+ numberToString: { type: Boolean, default: false },
3018
+ cacheTime: { default: 5 * 60 * 1e3 },
3019
+ enableCache: { type: Boolean, default: true },
3020
+ beforeFetch: {},
3021
+ afterFetch: {},
3022
+ onError: {}
3023
+ },
3024
+ emits: ["update:modelValue", "change", "options-change"],
3025
+ setup(__props, { expose: __expose, emit: __emit }) {
3026
+ const props = __props;
3027
+ const emit = __emit;
3028
+ const state = ref(props.modelValue);
3029
+ const rawOptions = ref([]);
3030
+ const { loading, data, isFirstLoad, fetch } = useApiRequest({
3031
+ api: props.api,
3032
+ params: toRef(props, "params"),
3033
+ immediate: props.immediate,
3034
+ resultField: props.resultField,
3035
+ cacheTime: props.cacheTime,
3036
+ enableCache: props.enableCache,
3037
+ beforeFetch: props.beforeFetch,
3038
+ afterFetch: props.afterFetch,
3039
+ onError: props.onError
3040
+ });
3041
+ watch(data, (newData) => {
3042
+ rawOptions.value = newData || [];
3043
+ emit("options-change", computedOptions.value);
3044
+ });
3045
+ const computedOptions = computed(() => {
3046
+ const { labelField, valueField, numberToString } = props;
3047
+ return rawOptions.value.map((item) => {
3048
+ const value = item[valueField];
3049
+ return {
3050
+ ...item,
3051
+ label: item[labelField],
3052
+ value: numberToString ? String(value) : value
3053
+ };
3054
+ });
3055
+ });
3056
+ const handlePopupVisibleChange = async (visible) => {
3057
+ if (!visible) return;
3058
+ if (props.alwaysLoad) {
3059
+ await fetch(true);
3060
+ } else if (!props.immediate && isFirstLoad.value) {
3061
+ await fetch();
3062
+ isFirstLoad.value = false;
3063
+ }
3064
+ };
3065
+ const handleChange = (value) => {
3066
+ emit("update:modelValue", value);
3067
+ const option = computedOptions.value.find((item) => item.value === value);
3068
+ emit("change", value, option || {});
3069
+ };
3070
+ watch(
3071
+ () => props.modelValue,
3072
+ (newValue) => {
3073
+ state.value = newValue;
3074
+ }
2617
3075
  );
2618
- if (index !== -1) {
2619
- fileListRef.value[index] = { ...fileListRef.value[index], ...fileItem };
3076
+ watch(state, (newValue) => {
3077
+ if (newValue !== props.modelValue) {
3078
+ emit("update:modelValue", newValue);
3079
+ }
3080
+ });
3081
+ __expose({
3082
+ /** 刷新数据 */
3083
+ refresh: () => fetch(true),
3084
+ /** 获取选项列表 */
3085
+ getOptions: () => computedOptions.value
3086
+ });
3087
+ return (_ctx, _cache) => {
3088
+ const _component_a_select = resolveComponent("a-select");
3089
+ return openBlock(), createBlock(_component_a_select, mergeProps({
3090
+ modelValue: state.value,
3091
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => state.value = $event),
3092
+ options: computedOptions.value,
3093
+ loading: unref(loading)
3094
+ }, _ctx.$attrs, {
3095
+ onChange: handleChange,
3096
+ onPopupVisibleChange: handlePopupVisibleChange
3097
+ }), createSlots({ _: 2 }, [
3098
+ renderList(_ctx.$slots, (_, name) => {
3099
+ return {
3100
+ name,
3101
+ fn: withCtx((slotData) => [
3102
+ renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotData || {})))
3103
+ ])
3104
+ };
3105
+ }),
3106
+ unref(loading) ? {
3107
+ name: "suffix-icon",
3108
+ fn: withCtx(() => [
3109
+ createVNode(unref(IconLoading))
3110
+ ]),
3111
+ key: "0"
3112
+ } : void 0
3113
+ ]), 1040, ["modelValue", "options", "loading"]);
3114
+ };
3115
+ }
3116
+ });
3117
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3118
+ __name: "ApiCascader",
3119
+ props: {
3120
+ modelValue: {},
3121
+ api: {},
3122
+ initFetchParams: {},
3123
+ immediate: { type: Boolean, default: true },
3124
+ resultField: { default: "" },
3125
+ labelField: { default: "label" },
3126
+ valueField: { default: "value" },
3127
+ childrenField: { default: "children" },
3128
+ numberToString: { type: Boolean, default: false },
3129
+ enableLoadData: { type: Boolean, default: false },
3130
+ isLeaf: {},
3131
+ asyncFetchParamKey: { default: "parentCode" },
3132
+ cacheTime: { default: 5 * 60 * 1e3 },
3133
+ enableCache: { type: Boolean, default: true },
3134
+ beforeFetch: {},
3135
+ afterFetch: {},
3136
+ onError: {}
3137
+ },
3138
+ emits: ["update:modelValue", "change"],
3139
+ setup(__props, { expose: __expose, emit: __emit }) {
3140
+ const props = __props;
3141
+ const emit = __emit;
3142
+ const state = ref(props.modelValue);
3143
+ const rawOptions = ref([]);
3144
+ const { loading, data, fetch } = useApiRequest({
3145
+ api: props.api,
3146
+ params: toRef(props, "initFetchParams"),
3147
+ immediate: props.immediate && !props.enableLoadData,
3148
+ resultField: props.resultField,
3149
+ cacheTime: props.cacheTime,
3150
+ enableCache: props.enableCache,
3151
+ beforeFetch: props.beforeFetch,
3152
+ afterFetch: props.afterFetch,
3153
+ onError: props.onError
3154
+ });
3155
+ watch(data, (newData) => {
3156
+ rawOptions.value = newData || [];
3157
+ });
3158
+ function transformOptions(options) {
3159
+ const { labelField, valueField, childrenField, numberToString, isLeaf } = props;
3160
+ return options.map((item) => {
3161
+ const value = item[valueField];
3162
+ const children = item[childrenField];
3163
+ const option = {
3164
+ ...item,
3165
+ label: item[labelField],
3166
+ value: numberToString ? String(value) : value
3167
+ };
3168
+ if (props.enableLoadData && isLeaf && typeof isLeaf === "function") {
3169
+ option.isLeaf = isLeaf(item);
3170
+ }
3171
+ if (children && Array.isArray(children) && children.length > 0) {
3172
+ option.children = transformOptions(children);
3173
+ }
3174
+ return option;
3175
+ });
2620
3176
  }
2621
- const upload2 = getUpload();
2622
- if (upload2.updateFile) {
2623
- upload2.updateFile(fileItem);
3177
+ const computedOptions = computed(() => {
3178
+ return transformOptions(rawOptions.value);
3179
+ });
3180
+ const handleLoadMore = async (option, done) => {
3181
+ if (!props.api || typeof props.api !== "function") {
3182
+ done();
3183
+ return;
3184
+ }
3185
+ try {
3186
+ option.loading = true;
3187
+ let fetchParams = {
3188
+ [props.asyncFetchParamKey]: option.value
3189
+ };
3190
+ if (props.beforeFetch && typeof props.beforeFetch === "function") {
3191
+ fetchParams = props.beforeFetch(fetchParams) || fetchParams;
3192
+ }
3193
+ const res = await props.api(fetchParams);
3194
+ let resultData;
3195
+ if (Array.isArray(res)) {
3196
+ resultData = res;
3197
+ } else if (props.resultField) {
3198
+ const keys = props.resultField.split(".");
3199
+ let data2 = res;
3200
+ for (const key of keys) {
3201
+ if (data2 == null) break;
3202
+ data2 = data2[key];
3203
+ }
3204
+ resultData = Array.isArray(data2) ? data2 : [];
3205
+ } else {
3206
+ resultData = (res == null ? void 0 : res.data) || (res == null ? void 0 : res.list) || (res == null ? void 0 : res.result) || [];
3207
+ if (!Array.isArray(resultData)) {
3208
+ resultData = [];
3209
+ }
3210
+ }
3211
+ if (props.afterFetch && typeof props.afterFetch === "function") {
3212
+ resultData = props.afterFetch(resultData) || resultData;
3213
+ }
3214
+ option.children = transformOptions(resultData);
3215
+ } catch (error) {
3216
+ console.error("[ApiCascader] 加载子节点失败:", error);
3217
+ if (props.onError && typeof props.onError === "function") {
3218
+ props.onError(error);
3219
+ }
3220
+ } finally {
3221
+ option.loading = false;
3222
+ done();
3223
+ }
3224
+ };
3225
+ const handleChange = (value, selectedOptions) => {
3226
+ emit("update:modelValue", value);
3227
+ emit("change", value, selectedOptions);
3228
+ };
3229
+ watch(
3230
+ () => props.modelValue,
3231
+ (newValue) => {
3232
+ state.value = newValue;
3233
+ }
3234
+ );
3235
+ watch(state, (newValue) => {
3236
+ if (newValue !== props.modelValue) {
3237
+ emit("update:modelValue", newValue);
3238
+ }
3239
+ });
3240
+ if (props.enableLoadData && props.immediate) {
3241
+ fetch();
2624
3242
  }
2625
- };
2626
- const setProps = (uploadProps) => {
2627
- getUpload().setProps(uploadProps);
2628
- };
2629
- const methods = {
2630
- get fileList() {
2631
- return fileListRef.value;
2632
- },
2633
- submit,
2634
- abort,
2635
- upload,
2636
- clearFiles,
2637
- getFileList,
2638
- setFileList,
2639
- addFile,
2640
- removeFile,
2641
- updateFile,
2642
- setProps
2643
- };
2644
- return [register, methods];
2645
- }
3243
+ __expose({
3244
+ /** 刷新数据 */
3245
+ refresh: () => fetch(true),
3246
+ /** 获取选项列表 */
3247
+ getOptions: () => computedOptions.value
3248
+ });
3249
+ return (_ctx, _cache) => {
3250
+ const _component_a_cascader = resolveComponent("a-cascader");
3251
+ return openBlock(), createBlock(_component_a_cascader, mergeProps({
3252
+ modelValue: state.value,
3253
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => state.value = $event),
3254
+ options: computedOptions.value,
3255
+ loading: unref(loading),
3256
+ "load-more": __props.enableLoadData ? handleLoadMore : void 0
3257
+ }, _ctx.$attrs, { onChange: handleChange }), createSlots({ _: 2 }, [
3258
+ renderList(_ctx.$slots, (_, name) => {
3259
+ return {
3260
+ name,
3261
+ fn: withCtx((slotData) => [
3262
+ renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotData || {})))
3263
+ ])
3264
+ };
3265
+ }),
3266
+ unref(loading) ? {
3267
+ name: "suffix-icon",
3268
+ fn: withCtx(() => [
3269
+ createVNode(unref(IconLoading))
3270
+ ]),
3271
+ key: "0"
3272
+ } : void 0
3273
+ ]), 1040, ["modelValue", "options", "loading", "load-more"]);
3274
+ };
3275
+ }
3276
+ });
2646
3277
  const componentMap = {
2647
3278
  Input,
2648
3279
  InputNumber,
@@ -2650,11 +3281,13 @@ const componentMap = {
2650
3281
  Textarea,
2651
3282
  AutoComplete,
2652
3283
  Select,
3284
+ ApiSelect: _sfc_main$8,
2653
3285
  Radio,
2654
3286
  RadioGroup,
2655
3287
  Checkbox,
2656
3288
  CheckboxGroup,
2657
3289
  Cascader,
3290
+ ApiCascader: _sfc_main$7,
2658
3291
  TreeSelect,
2659
3292
  DatePicker,
2660
3293
  TimePicker,
@@ -2688,10 +3321,12 @@ const componentsNeedPlaceholder = /* @__PURE__ */ new Set([
2688
3321
  ]);
2689
3322
  const componentsNeedSelectPlaceholder$1 = /* @__PURE__ */ new Set([
2690
3323
  "Select",
3324
+ "ApiSelect",
2691
3325
  "DatePicker",
2692
3326
  "TimePicker",
2693
3327
  "RangePicker",
2694
3328
  "Cascader",
3329
+ "ApiCascader",
2695
3330
  "TreeSelect"
2696
3331
  ]);
2697
3332
  const componentsNeedUploadPlaceholder$1 = /* @__PURE__ */ new Set([
@@ -4098,56 +4733,6 @@ function createFormSchema(schemas) {
4098
4733
  function mergeFormSchemas(...schemas) {
4099
4734
  return schemas.flat();
4100
4735
  }
4101
- function debounce(func, wait = 300, immediate = false) {
4102
- let timeout = null;
4103
- const debounced = function(...args) {
4104
- const context = this;
4105
- const later = () => {
4106
- timeout = null;
4107
- if (!immediate) {
4108
- func.apply(context, args);
4109
- }
4110
- };
4111
- const callNow = immediate && !timeout;
4112
- if (timeout) {
4113
- clearTimeout(timeout);
4114
- }
4115
- timeout = setTimeout(later, wait);
4116
- if (callNow) {
4117
- func.apply(context, args);
4118
- }
4119
- };
4120
- debounced.cancel = () => {
4121
- if (timeout) {
4122
- clearTimeout(timeout);
4123
- timeout = null;
4124
- }
4125
- };
4126
- return debounced;
4127
- }
4128
- function throttle(func, wait = 300) {
4129
- let timeout = null;
4130
- let previous = 0;
4131
- return function(...args) {
4132
- const context = this;
4133
- const now = Date.now();
4134
- const remaining = wait - (now - previous);
4135
- if (remaining <= 0 || remaining > wait) {
4136
- if (timeout) {
4137
- clearTimeout(timeout);
4138
- timeout = null;
4139
- }
4140
- previous = now;
4141
- func.apply(context, args);
4142
- } else if (!timeout) {
4143
- timeout = setTimeout(() => {
4144
- previous = Date.now();
4145
- timeout = null;
4146
- func.apply(context, args);
4147
- }, remaining);
4148
- }
4149
- };
4150
- }
4151
4736
  const _hoisted_1$4 = { class: "basic-text-ellipsis" };
4152
4737
  const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4153
4738
  __name: "BasicTextEllipsis",
@@ -5626,6 +6211,18 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
5626
6211
  return action.show !== false;
5627
6212
  });
5628
6213
  };
6214
+ const getVisibleActions = (record) => {
6215
+ var _a;
6216
+ const actions = getActionButtons(record);
6217
+ const maxVisible = ((_a = getMergedProps.value.actionColumn) == null ? void 0 : _a.maxVisible) ?? 3;
6218
+ if (actions.length <= maxVisible) {
6219
+ return { visible: actions, more: [] };
6220
+ }
6221
+ return {
6222
+ visible: actions.slice(0, maxVisible),
6223
+ more: actions.slice(maxVisible)
6224
+ };
6225
+ };
5629
6226
  const getActionDisabled = (action, record) => {
5630
6227
  if (typeof action.disabled === "function") {
5631
6228
  return action.disabled(record);
@@ -5778,8 +6375,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
5778
6375
  try {
5779
6376
  loadingRef.value = true;
5780
6377
  const fetchSetting = {
5781
- pageField: "page",
5782
- sizeField: "pageSize",
6378
+ pageField: "current",
6379
+ sizeField: "size",
5783
6380
  listField: "records",
5784
6381
  totalField: "total",
5785
6382
  ...mergedProps.fetchSetting
@@ -5851,15 +6448,6 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
5851
6448
  errorMessage = err.message || errorMessage;
5852
6449
  errorCode = err.code || errorCode;
5853
6450
  }
5854
- if (errorCode === ERROR_CODES.NETWORK_ERROR) {
5855
- Message.error("网络连接失败,请检查网络设置");
5856
- } else if (errorCode === ERROR_CODES.TIMEOUT) {
5857
- Message.error("请求超时,请稍后重试");
5858
- } else if (errorCode === ERROR_CODES.INVALID_RESPONSE) {
5859
- Message.error(`数据格式错误: ${errorMessage}`);
5860
- } else {
5861
- Message.error(`数据加载失败: ${errorMessage}`);
5862
- }
5863
6451
  dataSource.value = [];
5864
6452
  if (paginationRef.value) {
5865
6453
  paginationRef.value.total = 0;
@@ -6231,25 +6819,25 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
6231
6819
  }, {
6232
6820
  content: withCtx(() => [
6233
6821
  createVNode(_component_a_doption, { value: "mini" }, {
6234
- default: withCtx(() => [..._cache[2] || (_cache[2] = [
6822
+ default: withCtx(() => [..._cache[3] || (_cache[3] = [
6235
6823
  createTextVNode("紧凑", -1)
6236
6824
  ])]),
6237
6825
  _: 1
6238
6826
  }),
6239
6827
  createVNode(_component_a_doption, { value: "small" }, {
6240
- default: withCtx(() => [..._cache[3] || (_cache[3] = [
6828
+ default: withCtx(() => [..._cache[4] || (_cache[4] = [
6241
6829
  createTextVNode("偏小", -1)
6242
6830
  ])]),
6243
6831
  _: 1
6244
6832
  }),
6245
6833
  createVNode(_component_a_doption, { value: "medium" }, {
6246
- default: withCtx(() => [..._cache[4] || (_cache[4] = [
6834
+ default: withCtx(() => [..._cache[5] || (_cache[5] = [
6247
6835
  createTextVNode("默认", -1)
6248
6836
  ])]),
6249
6837
  _: 1
6250
6838
  }),
6251
6839
  createVNode(_component_a_doption, { value: "large" }, {
6252
- default: withCtx(() => [..._cache[5] || (_cache[5] = [
6840
+ default: withCtx(() => [..._cache[6] || (_cache[6] = [
6253
6841
  createTextVNode("宽松", -1)
6254
6842
  ])]),
6255
6843
  _: 1
@@ -6364,7 +6952,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
6364
6952
  }, () => [
6365
6953
  createVNode(_component_a_space, null, {
6366
6954
  default: withCtx(() => [
6367
- (openBlock(true), createElementBlock(Fragment, null, renderList(getActionButtons(slotProps.record), (action) => {
6955
+ (openBlock(true), createElementBlock(Fragment, null, renderList(getVisibleActions(slotProps.record).visible, (action) => {
6368
6956
  return openBlock(), createElementBlock(Fragment, {
6369
6957
  key: action.label
6370
6958
  }, [
@@ -6421,7 +7009,77 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
6421
7009
  } : void 0
6422
7010
  ]), 1032, ["status", "disabled", "onClick"]))
6423
7011
  ], 64);
6424
- }), 128))
7012
+ }), 128)),
7013
+ getVisibleActions(slotProps.record).more.length > 0 ? (openBlock(), createBlock(_component_a_dropdown, { key: 0 }, {
7014
+ content: withCtx(() => [
7015
+ (openBlock(true), createElementBlock(Fragment, null, renderList(getVisibleActions(slotProps.record).more, (action) => {
7016
+ return openBlock(), createElementBlock(Fragment, {
7017
+ key: action.label
7018
+ }, [
7019
+ action.popConfirm ? (openBlock(), createBlock(_component_a_popconfirm, {
7020
+ key: 0,
7021
+ content: action.popConfirm.title,
7022
+ "ok-text": action.popConfirm.okText,
7023
+ "cancel-text": action.popConfirm.cancelText,
7024
+ position: "lt",
7025
+ onOk: ($event) => {
7026
+ var _a2, _b2;
7027
+ return (_b2 = (_a2 = action.popConfirm).onConfirm) == null ? void 0 : _b2.call(_a2, slotProps.record);
7028
+ },
7029
+ onCancel: action.popConfirm.onCancel
7030
+ }, {
7031
+ default: withCtx(() => [
7032
+ createVNode(_component_a_doption, {
7033
+ disabled: getActionDisabled(action, slotProps.record),
7034
+ onClick: _cache[2] || (_cache[2] = withModifiers(() => {
7035
+ }, ["stop"]))
7036
+ }, createSlots({
7037
+ default: withCtx(() => [
7038
+ createTextVNode(" " + toDisplayString(action.label), 1)
7039
+ ]),
7040
+ _: 2
7041
+ }, [
7042
+ action.icon ? {
7043
+ name: "icon",
7044
+ fn: withCtx(() => [
7045
+ (openBlock(), createBlock(resolveDynamicComponent(action.icon)))
7046
+ ]),
7047
+ key: "0"
7048
+ } : void 0
7049
+ ]), 1032, ["disabled"])
7050
+ ]),
7051
+ _: 2
7052
+ }, 1032, ["content", "ok-text", "cancel-text", "onOk", "onCancel"])) : (openBlock(), createBlock(_component_a_doption, {
7053
+ key: 1,
7054
+ disabled: getActionDisabled(action, slotProps.record),
7055
+ onClick: ($event) => handleActionClick(action, slotProps.record)
7056
+ }, createSlots({
7057
+ default: withCtx(() => [
7058
+ createTextVNode(" " + toDisplayString(action.label), 1)
7059
+ ]),
7060
+ _: 2
7061
+ }, [
7062
+ action.icon ? {
7063
+ name: "icon",
7064
+ fn: withCtx(() => [
7065
+ (openBlock(), createBlock(resolveDynamicComponent(action.icon)))
7066
+ ]),
7067
+ key: "0"
7068
+ } : void 0
7069
+ ]), 1032, ["disabled", "onClick"]))
7070
+ ], 64);
7071
+ }), 128))
7072
+ ]),
7073
+ default: withCtx(() => [
7074
+ createVNode(_component_a_link, null, {
7075
+ icon: withCtx(() => [
7076
+ createVNode(unref(IconMore))
7077
+ ]),
7078
+ _: 1
7079
+ })
7080
+ ]),
7081
+ _: 2
7082
+ }, 1024)) : createCommentVNode("", true)
6425
7083
  ]),
6426
7084
  _: 2
6427
7085
  }, 1024)
@@ -6459,7 +7117,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
6459
7117
  };
6460
7118
  }
6461
7119
  });
6462
- const BasicTable = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-eebe4c3c"]]);
7120
+ const BasicTable = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-a9281777"]]);
6463
7121
  function useTable(options = {}) {
6464
7122
  const tableRef = ref(null);
6465
7123
  const formRef = ref(null);
@@ -7970,6 +8628,8 @@ function useToggle(initialValue = false) {
7970
8628
  return [value, toggle, setTrue, setFalse];
7971
8629
  }
7972
8630
  export {
8631
+ _sfc_main$7 as ApiCascader,
8632
+ _sfc_main$8 as ApiSelect,
7973
8633
  BasicDescription,
7974
8634
  _sfc_main$5 as BasicForm,
7975
8635
  BasicModal,
@@ -7980,6 +8640,8 @@ export {
7980
8640
  VideoPreview,
7981
8641
  VideoPreviewModal,
7982
8642
  classifyFiles,
8643
+ clearAllCache,
8644
+ clearApiCache,
7983
8645
  compareObjects,
7984
8646
  componentMap,
7985
8647
  createFormSchema,
@@ -8014,6 +8676,7 @@ export {
8014
8676
  rendererMap,
8015
8677
  safeToString,
8016
8678
  throttle,
8679
+ useApiRequest,
8017
8680
  useDebounce,
8018
8681
  useDescription,
8019
8682
  useForm,