knt-shared 1.9.2 → 1.10.1

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 (32) hide show
  1. package/dist/components/CheckUpdate/index.d.ts +2 -0
  2. package/dist/components/CheckUpdate/index.d.ts.map +1 -0
  3. package/dist/components/CheckUpdate/index.vue.d.ts +72 -0
  4. package/dist/components/CheckUpdate/index.vue.d.ts.map +1 -0
  5. package/dist/components/Drawer/BasicDrawer.vue.d.ts +11 -11
  6. package/dist/components/Form/BasicForm.vue.d.ts +1 -1
  7. package/dist/components/Form/componentMap.d.ts +55 -55
  8. package/dist/components/Form/components/ApiCascader.vue.d.ts +2 -2
  9. package/dist/components/Form/components/ApiSelect.vue.d.ts +2 -2
  10. package/dist/components/Image/BasicImage.vue.d.ts +2 -2
  11. package/dist/components/Modal/BasicModal.vue.d.ts +12 -12
  12. package/dist/components/Table/BasicTable.vue.d.ts +5 -5
  13. package/dist/components/Table/components/componentMap.d.ts +55 -55
  14. package/dist/components/Upload/BasicUpload.vue.d.ts +4 -4
  15. package/dist/components/Upload/components/SortableFileItem.vue.d.ts +2 -2
  16. package/dist/components/Upload/components/VideoPreview.vue.d.ts +4 -4
  17. package/dist/components/Upload/components/VideoPreviewModal.vue.d.ts +3 -3
  18. package/dist/components/index.d.ts +1 -0
  19. package/dist/components/index.d.ts.map +1 -1
  20. package/dist/hooks/index.d.ts +2 -0
  21. package/dist/hooks/index.d.ts.map +1 -1
  22. package/dist/hooks/useVersionCheck.d.ts +19 -0
  23. package/dist/hooks/useVersionCheck.d.ts.map +1 -0
  24. package/dist/index.cjs.js +235 -87
  25. package/dist/index.cjs.js.map +1 -1
  26. package/dist/index.esm.js +236 -88
  27. package/dist/index.esm.js.map +1 -1
  28. package/dist/utils/chunkErrorHandler.d.ts +2 -0
  29. package/dist/utils/chunkErrorHandler.d.ts.map +1 -0
  30. package/dist/utils/index.d.ts +1 -0
  31. package/dist/utils/index.d.ts.map +1 -1
  32. package/package.json +1 -1
package/dist/index.cjs.js CHANGED
@@ -24,7 +24,7 @@ var _export_sfc$1 = (sfc, props) => {
24
24
  }
25
25
  return sfc;
26
26
  };
27
- const _sfc_main$z = vue.defineComponent({
27
+ const _sfc_main$A = vue.defineComponent({
28
28
  name: "IconPlus",
29
29
  props: {
30
30
  size: {
@@ -94,7 +94,7 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
94
94
  vue.createElementVNode("path", { d: "M5 24h38M24 5v38" }, null, -1)
95
95
  ]), 14, _hoisted_1$u);
96
96
  }
97
- var _IconPlus = /* @__PURE__ */ _export_sfc$1(_sfc_main$z, [["render", _sfc_render$g]]);
97
+ var _IconPlus = /* @__PURE__ */ _export_sfc$1(_sfc_main$A, [["render", _sfc_render$g]]);
98
98
  const IconPlus = Object.assign(_IconPlus, {
99
99
  install: (app, options) => {
100
100
  var _a;
@@ -102,7 +102,7 @@ const IconPlus = Object.assign(_IconPlus, {
102
102
  app.component(iconPrefix + _IconPlus.name, _IconPlus);
103
103
  }
104
104
  });
105
- const _sfc_main$y = vue.defineComponent({
105
+ const _sfc_main$z = vue.defineComponent({
106
106
  name: "IconQuestionCircle",
107
107
  props: {
108
108
  size: {
@@ -173,7 +173,7 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
173
173
  vue.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)
174
174
  ]), 14, _hoisted_1$t);
175
175
  }
176
- var _IconQuestionCircle = /* @__PURE__ */ _export_sfc$1(_sfc_main$y, [["render", _sfc_render$f]]);
176
+ var _IconQuestionCircle = /* @__PURE__ */ _export_sfc$1(_sfc_main$z, [["render", _sfc_render$f]]);
177
177
  const IconQuestionCircle = Object.assign(_IconQuestionCircle, {
178
178
  install: (app, options) => {
179
179
  var _a;
@@ -181,7 +181,7 @@ const IconQuestionCircle = Object.assign(_IconQuestionCircle, {
181
181
  app.component(iconPrefix + _IconQuestionCircle.name, _IconQuestionCircle);
182
182
  }
183
183
  });
184
- const _sfc_main$x = vue.defineComponent({
184
+ const _sfc_main$y = vue.defineComponent({
185
185
  name: "IconEye",
186
186
  props: {
187
187
  size: {
@@ -255,7 +255,7 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
255
255
  vue.createElementVNode("path", { d: "M29 24a5 5 0 1 1-10 0 5 5 0 0 1 10 0Z" }, null, -1)
256
256
  ]), 14, _hoisted_1$s);
257
257
  }
258
- var _IconEye = /* @__PURE__ */ _export_sfc$1(_sfc_main$x, [["render", _sfc_render$e]]);
258
+ var _IconEye = /* @__PURE__ */ _export_sfc$1(_sfc_main$y, [["render", _sfc_render$e]]);
259
259
  const IconEye = Object.assign(_IconEye, {
260
260
  install: (app, options) => {
261
261
  var _a;
@@ -263,7 +263,7 @@ const IconEye = Object.assign(_IconEye, {
263
263
  app.component(iconPrefix + _IconEye.name, _IconEye);
264
264
  }
265
265
  });
266
- const _sfc_main$w = vue.defineComponent({
266
+ const _sfc_main$x = vue.defineComponent({
267
267
  name: "IconMore",
268
268
  props: {
269
269
  size: {
@@ -338,7 +338,7 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
338
338
  vue.createElementVNode("path", { d: "M38 25v-2h2v2h-2ZM23 25v-2h2v2h-2ZM8 25v-2h2v2H8Z" }, null, -1)
339
339
  ]), 14, _hoisted_1$r);
340
340
  }
341
- var _IconMore = /* @__PURE__ */ _export_sfc$1(_sfc_main$w, [["render", _sfc_render$d]]);
341
+ var _IconMore = /* @__PURE__ */ _export_sfc$1(_sfc_main$x, [["render", _sfc_render$d]]);
342
342
  const IconMore = Object.assign(_IconMore, {
343
343
  install: (app, options) => {
344
344
  var _a;
@@ -346,7 +346,7 @@ const IconMore = Object.assign(_IconMore, {
346
346
  app.component(iconPrefix + _IconMore.name, _IconMore);
347
347
  }
348
348
  });
349
- const _sfc_main$v = vue.defineComponent({
349
+ const _sfc_main$w = vue.defineComponent({
350
350
  name: "IconRefresh",
351
351
  props: {
352
352
  size: {
@@ -416,7 +416,7 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
416
416
  vue.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)
417
417
  ]), 14, _hoisted_1$q);
418
418
  }
419
- var _IconRefresh = /* @__PURE__ */ _export_sfc$1(_sfc_main$v, [["render", _sfc_render$c]]);
419
+ var _IconRefresh = /* @__PURE__ */ _export_sfc$1(_sfc_main$w, [["render", _sfc_render$c]]);
420
420
  const IconRefresh = Object.assign(_IconRefresh, {
421
421
  install: (app, options) => {
422
422
  var _a;
@@ -424,7 +424,7 @@ const IconRefresh = Object.assign(_IconRefresh, {
424
424
  app.component(iconPrefix + _IconRefresh.name, _IconRefresh);
425
425
  }
426
426
  });
427
- const _sfc_main$u = vue.defineComponent({
427
+ const _sfc_main$v = vue.defineComponent({
428
428
  name: "IconSearch",
429
429
  props: {
430
430
  size: {
@@ -494,7 +494,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
494
494
  vue.createElementVNode("path", { d: "M33.072 33.071c6.248-6.248 6.248-16.379 0-22.627-6.249-6.249-16.38-6.249-22.628 0-6.248 6.248-6.248 16.379 0 22.627 6.248 6.248 16.38 6.248 22.628 0Zm0 0 8.485 8.485" }, null, -1)
495
495
  ]), 14, _hoisted_1$p);
496
496
  }
497
- var _IconSearch = /* @__PURE__ */ _export_sfc$1(_sfc_main$u, [["render", _sfc_render$b]]);
497
+ var _IconSearch = /* @__PURE__ */ _export_sfc$1(_sfc_main$v, [["render", _sfc_render$b]]);
498
498
  const IconSearch = Object.assign(_IconSearch, {
499
499
  install: (app, options) => {
500
500
  var _a;
@@ -502,7 +502,7 @@ const IconSearch = Object.assign(_IconSearch, {
502
502
  app.component(iconPrefix + _IconSearch.name, _IconSearch);
503
503
  }
504
504
  });
505
- const _sfc_main$t = vue.defineComponent({
505
+ const _sfc_main$u = vue.defineComponent({
506
506
  name: "IconSettings",
507
507
  props: {
508
508
  size: {
@@ -573,7 +573,7 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
573
573
  vue.createElementVNode("path", { d: "M30 24a6 6 0 1 1-12 0 6 6 0 0 1 12 0Z" }, null, -1)
574
574
  ]), 14, _hoisted_1$o);
575
575
  }
576
- var _IconSettings = /* @__PURE__ */ _export_sfc$1(_sfc_main$t, [["render", _sfc_render$a]]);
576
+ var _IconSettings = /* @__PURE__ */ _export_sfc$1(_sfc_main$u, [["render", _sfc_render$a]]);
577
577
  const IconSettings = Object.assign(_IconSettings, {
578
578
  install: (app, options) => {
579
579
  var _a;
@@ -581,7 +581,7 @@ const IconSettings = Object.assign(_IconSettings, {
581
581
  app.component(iconPrefix + _IconSettings.name, _IconSettings);
582
582
  }
583
583
  });
584
- const _sfc_main$s = vue.defineComponent({
584
+ const _sfc_main$t = vue.defineComponent({
585
585
  name: "IconUpload",
586
586
  props: {
587
587
  size: {
@@ -651,7 +651,7 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
651
651
  vue.createElementVNode("path", { d: "M14.93 17.071 24.001 8l9.071 9.071m-9.07 16.071v-25M40 35v6H8v-6" }, null, -1)
652
652
  ]), 14, _hoisted_1$n);
653
653
  }
654
- var _IconUpload = /* @__PURE__ */ _export_sfc$1(_sfc_main$s, [["render", _sfc_render$9]]);
654
+ var _IconUpload = /* @__PURE__ */ _export_sfc$1(_sfc_main$t, [["render", _sfc_render$9]]);
655
655
  const IconUpload = Object.assign(_IconUpload, {
656
656
  install: (app, options) => {
657
657
  var _a;
@@ -659,7 +659,7 @@ const IconUpload = Object.assign(_IconUpload, {
659
659
  app.component(iconPrefix + _IconUpload.name, _IconUpload);
660
660
  }
661
661
  });
662
- const _sfc_main$r = vue.defineComponent({
662
+ const _sfc_main$s = vue.defineComponent({
663
663
  name: "IconDelete",
664
664
  props: {
665
665
  size: {
@@ -729,7 +729,7 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
729
729
  vue.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)
730
730
  ]), 14, _hoisted_1$m);
731
731
  }
732
- var _IconDelete = /* @__PURE__ */ _export_sfc$1(_sfc_main$r, [["render", _sfc_render$8]]);
732
+ var _IconDelete = /* @__PURE__ */ _export_sfc$1(_sfc_main$s, [["render", _sfc_render$8]]);
733
733
  const IconDelete = Object.assign(_IconDelete, {
734
734
  install: (app, options) => {
735
735
  var _a;
@@ -737,7 +737,7 @@ const IconDelete = Object.assign(_IconDelete, {
737
737
  app.component(iconPrefix + _IconDelete.name, _IconDelete);
738
738
  }
739
739
  });
740
- const _sfc_main$q = vue.defineComponent({
740
+ const _sfc_main$r = vue.defineComponent({
741
741
  name: "IconLineHeight",
742
742
  props: {
743
743
  size: {
@@ -813,7 +813,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
813
813
  vue.createElementVNode("path", { d: "M39 13h2l-2-3.5-2 3.5h2Zm0 0v22m0 0h2l-2 3.5-2-3.5h2Z" }, null, -1)
814
814
  ]), 14, _hoisted_1$l);
815
815
  }
816
- var _IconLineHeight = /* @__PURE__ */ _export_sfc$1(_sfc_main$q, [["render", _sfc_render$7]]);
816
+ var _IconLineHeight = /* @__PURE__ */ _export_sfc$1(_sfc_main$r, [["render", _sfc_render$7]]);
817
817
  const IconLineHeight = Object.assign(_IconLineHeight, {
818
818
  install: (app, options) => {
819
819
  var _a;
@@ -821,7 +821,7 @@ const IconLineHeight = Object.assign(_IconLineHeight, {
821
821
  app.component(iconPrefix + _IconLineHeight.name, _IconLineHeight);
822
822
  }
823
823
  });
824
- const _sfc_main$p = vue.defineComponent({
824
+ const _sfc_main$q = vue.defineComponent({
825
825
  name: "IconFullscreenExit",
826
826
  props: {
827
827
  size: {
@@ -891,7 +891,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
891
891
  vue.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)
892
892
  ]), 14, _hoisted_1$k);
893
893
  }
894
- var _IconFullscreenExit = /* @__PURE__ */ _export_sfc$1(_sfc_main$p, [["render", _sfc_render$6]]);
894
+ var _IconFullscreenExit = /* @__PURE__ */ _export_sfc$1(_sfc_main$q, [["render", _sfc_render$6]]);
895
895
  const IconFullscreenExit = Object.assign(_IconFullscreenExit, {
896
896
  install: (app, options) => {
897
897
  var _a;
@@ -899,7 +899,7 @@ const IconFullscreenExit = Object.assign(_IconFullscreenExit, {
899
899
  app.component(iconPrefix + _IconFullscreenExit.name, _IconFullscreenExit);
900
900
  }
901
901
  });
902
- const _sfc_main$o = vue.defineComponent({
902
+ const _sfc_main$p = vue.defineComponent({
903
903
  name: "IconFullscreen",
904
904
  props: {
905
905
  size: {
@@ -969,7 +969,7 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
969
969
  vue.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)
970
970
  ]), 14, _hoisted_1$j);
971
971
  }
972
- var _IconFullscreen = /* @__PURE__ */ _export_sfc$1(_sfc_main$o, [["render", _sfc_render$5]]);
972
+ var _IconFullscreen = /* @__PURE__ */ _export_sfc$1(_sfc_main$p, [["render", _sfc_render$5]]);
973
973
  const IconFullscreen = Object.assign(_IconFullscreen, {
974
974
  install: (app, options) => {
975
975
  var _a;
@@ -977,7 +977,7 @@ const IconFullscreen = Object.assign(_IconFullscreen, {
977
977
  app.component(iconPrefix + _IconFullscreen.name, _IconFullscreen);
978
978
  }
979
979
  });
980
- const _sfc_main$n = vue.defineComponent({
980
+ const _sfc_main$o = vue.defineComponent({
981
981
  name: "IconMute",
982
982
  props: {
983
983
  size: {
@@ -1047,7 +1047,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
1047
1047
  vue.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)
1048
1048
  ]), 14, _hoisted_1$i);
1049
1049
  }
1050
- var _IconMute = /* @__PURE__ */ _export_sfc$1(_sfc_main$n, [["render", _sfc_render$4]]);
1050
+ var _IconMute = /* @__PURE__ */ _export_sfc$1(_sfc_main$o, [["render", _sfc_render$4]]);
1051
1051
  const IconMute = Object.assign(_IconMute, {
1052
1052
  install: (app, options) => {
1053
1053
  var _a;
@@ -1055,7 +1055,7 @@ const IconMute = Object.assign(_IconMute, {
1055
1055
  app.component(iconPrefix + _IconMute.name, _IconMute);
1056
1056
  }
1057
1057
  });
1058
- const _sfc_main$m = vue.defineComponent({
1058
+ const _sfc_main$n = vue.defineComponent({
1059
1059
  name: "IconPause",
1060
1060
  props: {
1061
1061
  size: {
@@ -1130,7 +1130,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
1130
1130
  }, null, -1)
1131
1131
  ]), 14, _hoisted_1$h);
1132
1132
  }
1133
- var _IconPause = /* @__PURE__ */ _export_sfc$1(_sfc_main$m, [["render", _sfc_render$3]]);
1133
+ var _IconPause = /* @__PURE__ */ _export_sfc$1(_sfc_main$n, [["render", _sfc_render$3]]);
1134
1134
  const IconPause = Object.assign(_IconPause, {
1135
1135
  install: (app, options) => {
1136
1136
  var _a;
@@ -1138,7 +1138,7 @@ const IconPause = Object.assign(_IconPause, {
1138
1138
  app.component(iconPrefix + _IconPause.name, _IconPause);
1139
1139
  }
1140
1140
  });
1141
- const _sfc_main$l = vue.defineComponent({
1141
+ const _sfc_main$m = vue.defineComponent({
1142
1142
  name: "IconPlayArrow",
1143
1143
  props: {
1144
1144
  size: {
@@ -1208,7 +1208,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
1208
1208
  vue.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)
1209
1209
  ]), 14, _hoisted_1$g);
1210
1210
  }
1211
- var _IconPlayArrow = /* @__PURE__ */ _export_sfc$1(_sfc_main$l, [["render", _sfc_render$2]]);
1211
+ var _IconPlayArrow = /* @__PURE__ */ _export_sfc$1(_sfc_main$m, [["render", _sfc_render$2]]);
1212
1212
  const IconPlayArrow = Object.assign(_IconPlayArrow, {
1213
1213
  install: (app, options) => {
1214
1214
  var _a;
@@ -1216,7 +1216,7 @@ const IconPlayArrow = Object.assign(_IconPlayArrow, {
1216
1216
  app.component(iconPrefix + _IconPlayArrow.name, _IconPlayArrow);
1217
1217
  }
1218
1218
  });
1219
- const _sfc_main$k = vue.defineComponent({
1219
+ const _sfc_main$l = vue.defineComponent({
1220
1220
  name: "IconSound",
1221
1221
  props: {
1222
1222
  size: {
@@ -1287,7 +1287,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
1287
1287
  vue.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)
1288
1288
  ]), 14, _hoisted_1$f);
1289
1289
  }
1290
- var _IconSound = /* @__PURE__ */ _export_sfc$1(_sfc_main$k, [["render", _sfc_render$1]]);
1290
+ var _IconSound = /* @__PURE__ */ _export_sfc$1(_sfc_main$l, [["render", _sfc_render$1]]);
1291
1291
  const IconSound = Object.assign(_IconSound, {
1292
1292
  install: (app, options) => {
1293
1293
  var _a;
@@ -1295,7 +1295,7 @@ const IconSound = Object.assign(_IconSound, {
1295
1295
  app.component(iconPrefix + _IconSound.name, _IconSound);
1296
1296
  }
1297
1297
  });
1298
- const _sfc_main$j = vue.defineComponent({
1298
+ const _sfc_main$k = vue.defineComponent({
1299
1299
  name: "IconLoading",
1300
1300
  props: {
1301
1301
  size: {
@@ -1365,7 +1365,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1365
1365
  vue.createElementVNode("path", { d: "M42 24c0 9.941-8.059 18-18 18S6 33.941 6 24 14.059 6 24 6" }, null, -1)
1366
1366
  ]), 14, _hoisted_1$e);
1367
1367
  }
1368
- var _IconLoading = /* @__PURE__ */ _export_sfc$1(_sfc_main$j, [["render", _sfc_render]]);
1368
+ var _IconLoading = /* @__PURE__ */ _export_sfc$1(_sfc_main$k, [["render", _sfc_render]]);
1369
1369
  const IconLoading = Object.assign(_IconLoading, {
1370
1370
  install: (app, options) => {
1371
1371
  var _a;
@@ -2198,6 +2198,23 @@ function subtractLight(color, amount) {
2198
2198
  const c = cc < 0 ? 0 : cc;
2199
2199
  return c.toString(16).length > 1 ? c.toString(16) : `0${c.toString(16)}`;
2200
2200
  }
2201
+ const RELOAD_KEY = "vite_chunk_reload_at";
2202
+ const COOLDOWN_MS = 1e4;
2203
+ function isChunkLoadError(error) {
2204
+ var _a, _b;
2205
+ return ((_a = error == null ? void 0 : error.message) == null ? void 0 : _a.includes("Failed to fetch dynamically imported module")) || ((_b = error == null ? void 0 : error.message) == null ? void 0 : _b.includes("Importing a module script failed")) || (error == null ? void 0 : error.name) === "ChunkLoadError";
2206
+ }
2207
+ function setupChunkErrorHandler() {
2208
+ window.addEventListener("unhandledrejection", (event) => {
2209
+ if (!isChunkLoadError(event.reason)) return;
2210
+ const lastReloadAt = Number(sessionStorage.getItem(RELOAD_KEY) || 0);
2211
+ const now = Date.now();
2212
+ if (now - lastReloadAt > COOLDOWN_MS) {
2213
+ sessionStorage.setItem(RELOAD_KEY, String(now));
2214
+ window.location.reload();
2215
+ }
2216
+ });
2217
+ }
2201
2218
  const _hoisted_1$d = ["draggable"];
2202
2219
  const _hoisted_2$9 = ["src", "alt"];
2203
2220
  const _hoisted_3$7 = {
@@ -2213,7 +2230,7 @@ const _hoisted_6$4 = {
2213
2230
  key: 3,
2214
2231
  class: "error-tip"
2215
2232
  };
2216
- const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
2233
+ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
2217
2234
  ...{
2218
2235
  name: "SortableFileItem"
2219
2236
  },
@@ -2324,9 +2341,9 @@ const _export_sfc = (sfc, props) => {
2324
2341
  }
2325
2342
  return target;
2326
2343
  };
2327
- const SortableFileItem = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-07a9ff47"]]);
2344
+ const SortableFileItem = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-07a9ff47"]]);
2328
2345
  const _hoisted_1$c = { class: "sortable-file-list" };
2329
- const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
2346
+ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
2330
2347
  ...{
2331
2348
  name: "SortableFileList"
2332
2349
  },
@@ -2411,7 +2428,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
2411
2428
  };
2412
2429
  }
2413
2430
  });
2414
- const SortableFileList = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-1ede8f45"]]);
2431
+ const SortableFileList = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-1ede8f45"]]);
2415
2432
  const _hoisted_1$b = ["src", "autoplay", "loop", "muted", "preload"];
2416
2433
  const _hoisted_2$8 = {
2417
2434
  key: 0,
@@ -2429,7 +2446,7 @@ const _hoisted_8$1 = { class: "volume-slider-container" };
2429
2446
  const _hoisted_9 = { class: "time-display" };
2430
2447
  const _hoisted_10 = { class: "controls-right" };
2431
2448
  const _hoisted_11 = { class: "control-button" };
2432
- const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
2449
+ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
2433
2450
  ...{
2434
2451
  name: "VideoPreview"
2435
2452
  },
@@ -2775,11 +2792,11 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
2775
2792
  };
2776
2793
  }
2777
2794
  });
2778
- const VideoPreview = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-b982f870"]]);
2795
+ const VideoPreview = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-b982f870"]]);
2779
2796
  const _hoisted_1$a = { class: "video-modal-title" };
2780
2797
  const _hoisted_2$7 = { class: "file-name" };
2781
2798
  const _hoisted_3$5 = { class: "video-modal-content" };
2782
- const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
2799
+ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
2783
2800
  ...{
2784
2801
  name: "VideoPreviewModal"
2785
2802
  },
@@ -2850,7 +2867,7 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
2850
2867
  };
2851
2868
  }
2852
2869
  });
2853
- const VideoPreviewModal = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-cac8e63e"]]);
2870
+ const VideoPreviewModal = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-cac8e63e"]]);
2854
2871
  const _hoisted_1$9 = { class: "basic-upload" };
2855
2872
  const _hoisted_2$6 = {
2856
2873
  key: 0,
@@ -2877,7 +2894,7 @@ const _hoisted_8 = {
2877
2894
  key: 5,
2878
2895
  class: "inline-video-preview"
2879
2896
  };
2880
- const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
2897
+ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
2881
2898
  ...{
2882
2899
  name: "BasicUpload",
2883
2900
  inheritAttrs: false
@@ -3596,7 +3613,7 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
3596
3613
  };
3597
3614
  }
3598
3615
  });
3599
- const BasicUpload = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-47c7dc74"]]);
3616
+ const BasicUpload = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-47c7dc74"]]);
3600
3617
  function useUpload(props) {
3601
3618
  const uploadRef = vue.ref(null);
3602
3619
  const fileListRef = vue.ref((props == null ? void 0 : props.defaultFileList) || []);
@@ -3742,7 +3759,7 @@ function useApiRequest(options) {
3742
3759
  const data = vue.ref([]);
3743
3760
  const isFirstLoad = vue.ref(true);
3744
3761
  const error = vue.ref(null);
3745
- async function fetch(forceRefresh = false) {
3762
+ async function fetch2(forceRefresh = false) {
3746
3763
  if (!api || typeof api !== "function") {
3747
3764
  console.warn("[useApiRequest] api 必须是一个函数");
3748
3765
  return;
@@ -3794,7 +3811,7 @@ function useApiRequest(options) {
3794
3811
  loading.value = false;
3795
3812
  }
3796
3813
  }
3797
- const debouncedFetch = debounce(fetch, debounceTime);
3814
+ const debouncedFetch = debounce(fetch2, debounceTime);
3798
3815
  let stopParamsWatch = null;
3799
3816
  if (params) {
3800
3817
  stopParamsWatch = vue.watch(
@@ -3808,7 +3825,7 @@ function useApiRequest(options) {
3808
3825
  );
3809
3826
  }
3810
3827
  if (immediate) {
3811
- fetch();
3828
+ fetch2();
3812
3829
  }
3813
3830
  if (immediate) {
3814
3831
  isFirstLoad.value = false;
@@ -3830,9 +3847,9 @@ function useApiRequest(options) {
3830
3847
  /** 是否首次加载 */
3831
3848
  isFirstLoad,
3832
3849
  /** 执行请求 */
3833
- fetch,
3850
+ fetch: fetch2,
3834
3851
  /** 刷新数据(忽略缓存) */
3835
- refresh: () => fetch(true)
3852
+ refresh: () => fetch2(true)
3836
3853
  };
3837
3854
  }
3838
3855
  function clearAllCache() {
@@ -3842,7 +3859,7 @@ function clearApiCache(api, params) {
3842
3859
  const cacheKey = getCacheKey(api, params);
3843
3860
  cacheMap.delete(cacheKey);
3844
3861
  }
3845
- const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
3862
+ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
3846
3863
  __name: "ApiSelect",
3847
3864
  props: {
3848
3865
  modelValue: {},
@@ -3866,7 +3883,7 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
3866
3883
  const emit = __emit;
3867
3884
  const state = vue.ref(props.modelValue);
3868
3885
  const rawOptions = vue.ref([]);
3869
- const { loading, data, isFirstLoad, fetch } = useApiRequest({
3886
+ const { loading, data, isFirstLoad, fetch: fetch2 } = useApiRequest({
3870
3887
  api: props.api,
3871
3888
  params: vue.toRef(props, "params"),
3872
3889
  immediate: props.immediate,
@@ -3895,9 +3912,9 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
3895
3912
  const handlePopupVisibleChange = async (visible) => {
3896
3913
  if (!visible) return;
3897
3914
  if (props.alwaysLoad) {
3898
- await fetch(true);
3915
+ await fetch2(true);
3899
3916
  } else if (!props.immediate && isFirstLoad.value) {
3900
- await fetch();
3917
+ await fetch2();
3901
3918
  isFirstLoad.value = false;
3902
3919
  }
3903
3920
  };
@@ -3919,7 +3936,7 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
3919
3936
  });
3920
3937
  __expose({
3921
3938
  /** 刷新数据 */
3922
- refresh: () => fetch(true),
3939
+ refresh: () => fetch2(true),
3923
3940
  /** 获取选项列表 */
3924
3941
  getOptions: () => computedOptions.value
3925
3942
  });
@@ -3952,7 +3969,7 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
3952
3969
  };
3953
3970
  }
3954
3971
  });
3955
- const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
3972
+ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
3956
3973
  __name: "ApiCascader",
3957
3974
  props: {
3958
3975
  modelValue: {},
@@ -3979,7 +3996,7 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
3979
3996
  const emit = __emit;
3980
3997
  const state = vue.ref(props.modelValue);
3981
3998
  const rawOptions = vue.ref([]);
3982
- const { loading, data, fetch } = useApiRequest({
3999
+ const { loading, data, fetch: fetch2 } = useApiRequest({
3983
4000
  api: props.api,
3984
4001
  params: vue.toRef(props, "initFetchParams"),
3985
4002
  immediate: props.immediate && !props.enableLoadData,
@@ -4076,11 +4093,11 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
4076
4093
  }
4077
4094
  });
4078
4095
  if (props.enableLoadData && props.immediate) {
4079
- fetch();
4096
+ fetch2();
4080
4097
  }
4081
4098
  __expose({
4082
4099
  /** 刷新数据 */
4083
- refresh: () => fetch(true),
4100
+ refresh: () => fetch2(true),
4084
4101
  /** 获取选项列表 */
4085
4102
  getOptions: () => computedOptions.value
4086
4103
  });
@@ -4118,13 +4135,13 @@ const componentMap = {
4118
4135
  Textarea: ArcoVue.Textarea,
4119
4136
  AutoComplete: ArcoVue.AutoComplete,
4120
4137
  Select: ArcoVue.Select,
4121
- ApiSelect: _sfc_main$d,
4138
+ ApiSelect: _sfc_main$e,
4122
4139
  Radio: ArcoVue.Radio,
4123
4140
  RadioGroup: ArcoVue.RadioGroup,
4124
4141
  Checkbox: ArcoVue.Checkbox,
4125
4142
  CheckboxGroup: ArcoVue.CheckboxGroup,
4126
4143
  Cascader: ArcoVue.Cascader,
4127
- ApiCascader: _sfc_main$c,
4144
+ ApiCascader: _sfc_main$d,
4128
4145
  TreeSelect: ArcoVue.TreeSelect,
4129
4146
  DatePicker: ArcoVue.DatePicker,
4130
4147
  TimePicker: ArcoVue.TimePicker,
@@ -4730,7 +4747,7 @@ const rendererMap = {
4730
4747
  function getRenderer(component = "Input") {
4731
4748
  return rendererMap[component] || rendererMap.default;
4732
4749
  }
4733
- const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
4750
+ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
4734
4751
  ...{
4735
4752
  name: "BasicReadonlyField",
4736
4753
  inheritAttrs: false
@@ -4839,7 +4856,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
4839
4856
  };
4840
4857
  }
4841
4858
  });
4842
- const BasicReadonlyField = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-3d2d24e0"]]);
4859
+ const BasicReadonlyField = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-3d2d24e0"]]);
4843
4860
  function useReadonlyField(options) {
4844
4861
  const defaultEmptyText = (options == null ? void 0 : options.defaultEmptyText) || "-";
4845
4862
  const globalLabelMap = (options == null ? void 0 : options.globalLabelMap) || {};
@@ -4951,7 +4968,7 @@ function useReadonlyField(options) {
4951
4968
  clearCache
4952
4969
  };
4953
4970
  }
4954
- const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
4971
+ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
4955
4972
  ...{
4956
4973
  name: "BasicForm",
4957
4974
  inheritAttrs: false
@@ -5760,7 +5777,7 @@ function mergeFormSchemas(...schemas) {
5760
5777
  return schemas.flat();
5761
5778
  }
5762
5779
  const _hoisted_1$8 = { class: "basic-text-ellipsis" };
5763
- const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
5780
+ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
5764
5781
  __name: "BasicTextEllipsis",
5765
5782
  props: {
5766
5783
  text: { default: "" },
@@ -5873,7 +5890,7 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
5873
5890
  };
5874
5891
  }
5875
5892
  });
5876
- const BasicTextEllipsis = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-305f9842"]]);
5893
+ const BasicTextEllipsis = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-305f9842"]]);
5877
5894
  function useLocalStorage(key, initialValue) {
5878
5895
  let initialStoredValue;
5879
5896
  try {
@@ -6288,7 +6305,7 @@ const _hoisted_2$5 = {
6288
6305
  key: 2,
6289
6306
  class: "edit-cell-error"
6290
6307
  };
6291
- const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
6308
+ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
6292
6309
  ...{
6293
6310
  name: "EditCell"
6294
6311
  },
@@ -6386,7 +6403,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
6386
6403
  };
6387
6404
  }
6388
6405
  });
6389
- const EditCell = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-52761074"]]);
6406
+ const EditCell = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-52761074"]]);
6390
6407
  function useEditValidation() {
6391
6408
  const validateField = async (value, column, record) => {
6392
6409
  if (!column.editRule) {
@@ -6815,7 +6832,7 @@ const _hoisted_5$2 = {
6815
6832
  class: "toolbar-right"
6816
6833
  };
6817
6834
  const _hoisted_6$1 = { class: "column-setting" };
6818
- const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
6835
+ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
6819
6836
  ...{
6820
6837
  name: "BasicTable"
6821
6838
  },
@@ -7933,7 +7950,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
7933
7950
  class: vue.normalizeClass(["basic-table-wrapper", { "is-fullscreen": isFullscreen.value }])
7934
7951
  }, [
7935
7952
  getSearchConfig.value.show ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6, [
7936
- vue.createVNode(vue.unref(_sfc_main$a), vue.mergeProps({
7953
+ vue.createVNode(vue.unref(_sfc_main$b), vue.mergeProps({
7937
7954
  ref_key: "searchFormRef",
7938
7955
  ref: searchFormRef
7939
7956
  }, getSearchFormProps.value, {
@@ -8311,7 +8328,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
8311
8328
  };
8312
8329
  }
8313
8330
  });
8314
- const BasicTable = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-b3a2e402"]]);
8331
+ const BasicTable = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-b3a2e402"]]);
8315
8332
  function useTable(options = {}) {
8316
8333
  const tableRef = vue.ref(null);
8317
8334
  const formRef = vue.ref(null);
@@ -8672,7 +8689,7 @@ function mergeTableColumns(...columns) {
8672
8689
  }
8673
8690
  const _hoisted_1$5 = { style: { "position": "relative", "width": "100%" } };
8674
8691
  const _hoisted_2$3 = { key: 1 };
8675
- const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
8692
+ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
8676
8693
  ...{
8677
8694
  name: "BasicModal",
8678
8695
  inheritAttrs: false
@@ -9119,7 +9136,7 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
9119
9136
  };
9120
9137
  }
9121
9138
  });
9122
- const BasicModal = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-e4400cf8"]]);
9139
+ const BasicModal = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-e4400cf8"]]);
9123
9140
  function useModal(props) {
9124
9141
  const modalRef = vue.ref(null);
9125
9142
  const loadedRef = vue.ref(false);
@@ -9278,7 +9295,7 @@ function useModalInner(callbackFn) {
9278
9295
  ];
9279
9296
  }
9280
9297
  const _hoisted_1$4 = { style: { "position": "relative", "display": "flex", "align-items": "center", "gap": "0.5rem" } };
9281
- const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
9298
+ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
9282
9299
  ...{
9283
9300
  name: "BasicDrawer",
9284
9301
  inheritAttrs: false
@@ -9643,7 +9660,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
9643
9660
  };
9644
9661
  }
9645
9662
  });
9646
- const BasicDrawer = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-83e4752e"]]);
9663
+ const BasicDrawer = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-83e4752e"]]);
9647
9664
  function useDrawer(props) {
9648
9665
  const drawerRef = vue.ref(null);
9649
9666
  const loadedRef = vue.ref(false);
@@ -9812,7 +9829,7 @@ const _hoisted_4$1 = {
9812
9829
  class: "description-extra"
9813
9830
  };
9814
9831
  const _hoisted_5$1 = { key: 1 };
9815
- const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
9832
+ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
9816
9833
  ...{
9817
9834
  name: "BasicDescription",
9818
9835
  inheritAttrs: false
@@ -10062,7 +10079,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
10062
10079
  };
10063
10080
  }
10064
10081
  });
10065
- const BasicDescription = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-93ccbd39"]]);
10082
+ const BasicDescription = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-93ccbd39"]]);
10066
10083
  function useDescription(props) {
10067
10084
  const descriptionRef = vue.ref(null);
10068
10085
  const loadedRef = vue.ref(false);
@@ -10124,7 +10141,7 @@ const _hoisted_7 = {
10124
10141
  key: 0,
10125
10142
  style: { "display": "none" }
10126
10143
  };
10127
- const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
10144
+ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
10128
10145
  ...{
10129
10146
  name: "BasicImage"
10130
10147
  },
@@ -10261,7 +10278,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
10261
10278
  };
10262
10279
  }
10263
10280
  });
10264
- const BasicImage = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-04c54d5a"]]);
10281
+ const BasicImage = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-04c54d5a"]]);
10265
10282
  function useImage(options) {
10266
10283
  const imageRef = vue.ref(null);
10267
10284
  const loadedRef = vue.ref(false);
@@ -10314,7 +10331,7 @@ const _hoisted_3 = {
10314
10331
  key: 0,
10315
10332
  class: "knt-spinner__tip"
10316
10333
  };
10317
- const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
10334
+ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
10318
10335
  ...{ name: "LoadingSpinner" },
10319
10336
  __name: "LoadingSpinner",
10320
10337
  props: {
@@ -10333,9 +10350,9 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
10333
10350
  };
10334
10351
  }
10335
10352
  });
10336
- const LoadingSpinner = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-8cd97aae"]]);
10353
+ const LoadingSpinner = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-8cd97aae"]]);
10337
10354
  const _hoisted_1 = { class: "knt-loading-overlay__content" };
10338
- const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
10355
+ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
10339
10356
  ...{
10340
10357
  name: "LoadingOverlay",
10341
10358
  inheritAttrs: false
@@ -10376,8 +10393,8 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
10376
10393
  };
10377
10394
  }
10378
10395
  });
10379
- const LoadingOverlay = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-b25f4ff8"]]);
10380
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
10396
+ const LoadingOverlay = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-b25f4ff8"]]);
10397
+ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
10381
10398
  ...{
10382
10399
  name: "BasicLoading",
10383
10400
  inheritAttrs: false
@@ -10541,6 +10558,134 @@ function createLoading(options = {}) {
10541
10558
  setTip
10542
10559
  };
10543
10560
  }
10561
+ function useVersionCheck(options = {}) {
10562
+ const {
10563
+ enabled = true,
10564
+ versionUrl = "/version.json",
10565
+ checkInterval = 10 * 60 * 1e3,
10566
+ sessionKey = "app_current_version"
10567
+ } = options;
10568
+ const hasNewVersion = vue.ref(false);
10569
+ let currentVersion = "";
10570
+ let pendingRemoteVersion = "";
10571
+ let isFirstCheck = true;
10572
+ let modalShown = false;
10573
+ let timer = null;
10574
+ let onUpdateCallback = null;
10575
+ let visibilityHandler = null;
10576
+ async function fetchRemoteVersion() {
10577
+ try {
10578
+ const res = await fetch(`${versionUrl}?t=${Date.now()}`, { cache: "no-store" });
10579
+ if (!res.ok) return null;
10580
+ const data = await res.json();
10581
+ return data.version ?? null;
10582
+ } catch {
10583
+ return null;
10584
+ }
10585
+ }
10586
+ function syncLocalVersion(version) {
10587
+ currentVersion = version;
10588
+ sessionStorage.setItem(sessionKey, version);
10589
+ }
10590
+ async function checkVersion() {
10591
+ if (!enabled) return;
10592
+ const remoteVersion = await fetchRemoteVersion();
10593
+ if (!remoteVersion) return;
10594
+ if (isFirstCheck) {
10595
+ isFirstCheck = false;
10596
+ syncLocalVersion(remoteVersion);
10597
+ return;
10598
+ }
10599
+ if (remoteVersion !== currentVersion) {
10600
+ pendingRemoteVersion = remoteVersion;
10601
+ onUpdateCallback == null ? void 0 : onUpdateCallback();
10602
+ }
10603
+ }
10604
+ function start() {
10605
+ if (!enabled) return;
10606
+ currentVersion = sessionStorage.getItem(sessionKey) || "";
10607
+ checkVersion();
10608
+ if (!timer) {
10609
+ timer = setInterval(checkVersion, checkInterval);
10610
+ }
10611
+ if (!visibilityHandler) {
10612
+ visibilityHandler = () => {
10613
+ if (document.visibilityState === "visible") checkVersion();
10614
+ };
10615
+ document.addEventListener("visibilitychange", visibilityHandler);
10616
+ }
10617
+ onUpdateCallback = () => {
10618
+ if (modalShown) return;
10619
+ modalShown = true;
10620
+ hasNewVersion.value = true;
10621
+ };
10622
+ }
10623
+ function stop() {
10624
+ if (timer) {
10625
+ clearInterval(timer);
10626
+ timer = null;
10627
+ }
10628
+ if (visibilityHandler) {
10629
+ document.removeEventListener("visibilitychange", visibilityHandler);
10630
+ visibilityHandler = null;
10631
+ }
10632
+ modalShown = false;
10633
+ hasNewVersion.value = false;
10634
+ onUpdateCallback = null;
10635
+ }
10636
+ function applyUpdate() {
10637
+ const version = pendingRemoteVersion || currentVersion;
10638
+ if (version) syncLocalVersion(version);
10639
+ window.location.reload();
10640
+ }
10641
+ function dismissUpdate() {
10642
+ modalShown = false;
10643
+ hasNewVersion.value = false;
10644
+ }
10645
+ return { hasNewVersion, start, stop, checkVersion, applyUpdate, dismissUpdate };
10646
+ }
10647
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
10648
+ __name: "index",
10649
+ props: {
10650
+ enabled: { type: Boolean, default: true },
10651
+ versionUrl: {},
10652
+ checkInterval: {},
10653
+ sessionKey: {},
10654
+ title: { default: "页面超时" },
10655
+ content: { default: "页面已超时,请刷新后正常使用" },
10656
+ okText: { default: "立即刷新" },
10657
+ cancelText: { default: "稍后再说" }
10658
+ },
10659
+ setup(__props) {
10660
+ const props = __props;
10661
+ const { hasNewVersion, start, stop, applyUpdate, dismissUpdate } = useVersionCheck({
10662
+ enabled: props.enabled,
10663
+ versionUrl: props.versionUrl,
10664
+ checkInterval: props.checkInterval,
10665
+ sessionKey: props.sessionKey
10666
+ });
10667
+ vue.onMounted(() => start());
10668
+ vue.onUnmounted(() => stop());
10669
+ vue.watch(hasNewVersion, (val) => {
10670
+ if (!val) return;
10671
+ ArcoVue.Modal.confirm({
10672
+ title: props.title,
10673
+ content: () => vue.h(
10674
+ "div",
10675
+ { style: "text-align: center; font-weight: bold; font-size: 16px" },
10676
+ props.content
10677
+ ),
10678
+ okText: props.okText,
10679
+ cancelText: props.cancelText,
10680
+ onCancel: () => dismissUpdate(),
10681
+ onOk: () => applyUpdate()
10682
+ });
10683
+ });
10684
+ return (_ctx, _cache) => {
10685
+ return vue.openBlock(), vue.createElementBlock("div");
10686
+ };
10687
+ }
10688
+ });
10544
10689
  function useDebounce(value, delay = 300) {
10545
10690
  const debouncedValue = vue.ref(value.value);
10546
10691
  let timer = null;
@@ -10584,18 +10729,19 @@ const KntSharedPlugin = {
10584
10729
  app.use(ArcoVue);
10585
10730
  }
10586
10731
  };
10587
- exports.ApiCascader = _sfc_main$c;
10588
- exports.ApiSelect = _sfc_main$d;
10732
+ exports.ApiCascader = _sfc_main$d;
10733
+ exports.ApiSelect = _sfc_main$e;
10589
10734
  exports.BasicDescription = BasicDescription;
10590
10735
  exports.BasicDrawer = BasicDrawer;
10591
- exports.BasicForm = _sfc_main$a;
10736
+ exports.BasicForm = _sfc_main$b;
10592
10737
  exports.BasicImage = BasicImage;
10593
- exports.BasicLoading = _sfc_main;
10738
+ exports.BasicLoading = _sfc_main$1;
10594
10739
  exports.BasicModal = BasicModal;
10595
10740
  exports.BasicReadonlyField = BasicReadonlyField;
10596
10741
  exports.BasicTable = BasicTable;
10597
10742
  exports.BasicTextEllipsis = BasicTextEllipsis;
10598
10743
  exports.BasicUpload = BasicUpload;
10744
+ exports.CheckUpdate = _sfc_main;
10599
10745
  exports.EditCell = EditCell;
10600
10746
  exports.KntSharedPlugin = KntSharedPlugin;
10601
10747
  exports.VideoPreview = VideoPreview;
@@ -10673,6 +10819,7 @@ exports.rendererMap = rendererMap;
10673
10819
  exports.rgbToHex = rgbToHex;
10674
10820
  exports.safeToString = safeToString;
10675
10821
  exports.setObjToUrlParams = setObjToUrlParams;
10822
+ exports.setupChunkErrorHandler = setupChunkErrorHandler;
10676
10823
  exports.throttle = throttle;
10677
10824
  exports.transFormUrlPath = transFormUrlPath;
10678
10825
  exports.transformBackUrl = transformBackUrl;
@@ -10693,4 +10840,5 @@ exports.useReadonlyField = useReadonlyField;
10693
10840
  exports.useTable = useTable;
10694
10841
  exports.useToggle = useToggle;
10695
10842
  exports.useUpload = useUpload;
10843
+ exports.useVersionCheck = useVersionCheck;
10696
10844
  //# sourceMappingURL=index.cjs.js.map