@dao-style/core 0.0.1-beta.11 → 0.0.1-beta.14

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.
@@ -17,7 +17,7 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, renderSlot, createCommentVNode, createElementVNode, unref, resolveComponent, Fragment, createBlock, createTextVNode, toDisplayString, ref, inject, watchEffect, mergeProps, provide, toRefs, createVNode, withCtx, watch, Transition, withModifiers, normalizeStyle, withDirectives, vShow, withKeys, getCurrentInstance, onMounted, onBeforeUnmount, Teleport, nextTick, reactive, renderList, vModelText, toRef, onUnmounted, h } from "vue";
20
+ import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, renderSlot, createCommentVNode, createElementVNode, unref, resolveComponent, Fragment, createBlock, createTextVNode, toDisplayString, ref, inject, watchEffect, mergeProps, provide, readonly, toRefs, createVNode, withCtx, watch, Transition, withModifiers, normalizeStyle, withDirectives, vShow, withKeys, getCurrentInstance, onMounted, onBeforeUnmount, Teleport, nextTick, reactive, renderList, getCurrentScope, onScopeDispose, vModelText, onUnmounted, h } from "vue";
21
21
  import { isArray, isSet, looseIndexOf, looseEqual, isFunction, NOOP } from "@vue/shared";
22
22
  var actionIcon_vue_vue_type_style_index_0_lang = "";
23
23
  var _export_sfc = (sfc, props) => {
@@ -55,7 +55,7 @@ const _sfc_main$I = defineComponent({
55
55
  };
56
56
  }
57
57
  });
58
- const _hoisted_1$x = ["disabled"];
58
+ const _hoisted_1$w = ["disabled"];
59
59
  function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
60
60
  return openBlock(), createElementBlock("button", {
61
61
  class: normalizeClass(["dao-action-icon", `dao-action-icon--type-${_ctx.type}`]),
@@ -68,7 +68,7 @@ function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
68
68
  class: normalizeClass(["dao-action-icon__iconfont", _ctx.name])
69
69
  }, null, 2)) : createCommentVNode("", true)
70
70
  ])
71
- ], 10, _hoisted_1$x);
71
+ ], 10, _hoisted_1$w);
72
72
  }
73
73
  var DaoActionIcon = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render$F]]);
74
74
  const BUTTON_TYPES = ["primary", "secondary", "tertiary", "ghost", "danger"];
@@ -122,7 +122,7 @@ const _sfc_main$H = defineComponent({
122
122
  }
123
123
  }
124
124
  });
125
- const _hoisted_1$w = {
125
+ const _hoisted_1$v = {
126
126
  key: 1,
127
127
  class: "dao-icon dao-svg-icon"
128
128
  };
@@ -131,7 +131,7 @@ function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) {
131
131
  return _ctx.useFont ? (openBlock(), createElementBlock("i", {
132
132
  key: 0,
133
133
  class: normalizeClass(["dao-icon dao-iconfont", _ctx.name])
134
- }, null, 2)) : (openBlock(), createElementBlock("svg", _hoisted_1$w, [
134
+ }, null, 2)) : (openBlock(), createElementBlock("svg", _hoisted_1$v, [
135
135
  createElementVNode("use", {
136
136
  "xlink:href": `#${_ctx.name}`
137
137
  }, null, 8, _hoisted_2$l)
@@ -234,7 +234,7 @@ const _sfc_main$G = defineComponent({
234
234
  };
235
235
  }
236
236
  });
237
- const _hoisted_1$v = ["disabled"];
237
+ const _hoisted_1$u = ["disabled"];
238
238
  const _hoisted_2$k = {
239
239
  key: 1,
240
240
  class: "dao-btn__text"
@@ -263,16 +263,16 @@ function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
263
263
  name: _ctx.realIconRight
264
264
  }, null, 8, ["class", "use-font", "name"])) : createCommentVNode("", true)
265
265
  ], 64))
266
- ], 10, _hoisted_1$v);
266
+ ], 10, _hoisted_1$u);
267
267
  }
268
268
  var DaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$D]]);
269
269
  var buttonGroup_vue_vue_type_style_index_0_lang = "";
270
270
  const _sfc_main$F = defineComponent({
271
271
  name: "DaoButtonGroup"
272
272
  });
273
- const _hoisted_1$u = { class: "dao-btn-group" };
273
+ const _hoisted_1$t = { class: "dao-btn-group" };
274
274
  function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
275
- return openBlock(), createElementBlock("div", _hoisted_1$u, [
275
+ return openBlock(), createElementBlock("div", _hoisted_1$t, [
276
276
  renderSlot(_ctx.$slots, "default")
277
277
  ]);
278
278
  }
@@ -306,7 +306,7 @@ const _sfc_main$E = defineComponent({
306
306
  }
307
307
  }
308
308
  });
309
- const _hoisted_1$t = {
309
+ const _hoisted_1$s = {
310
310
  key: 0,
311
311
  class: "dao-card-header"
312
312
  };
@@ -314,14 +314,14 @@ const _hoisted_2$j = {
314
314
  key: 0,
315
315
  class: "dao-card-header-item"
316
316
  };
317
- const _hoisted_3$d = { class: "dao-card-header-item dao-card-header-title" };
318
- const _hoisted_4$c = { class: "dao-card-header-item dao-card-header-action" };
317
+ const _hoisted_3$c = { class: "dao-card-header-item dao-card-header-title" };
318
+ const _hoisted_4$a = { class: "dao-card-header-item dao-card-header-action" };
319
319
  function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
320
320
  const _component_dao_icon = resolveComponent("dao-icon");
321
321
  return openBlock(), createElementBlock("div", {
322
322
  class: normalizeClass(["dao-card", `dao-card--${_ctx.type}`])
323
323
  }, [
324
- _ctx.type !== "headless" ? (openBlock(), createElementBlock("div", _hoisted_1$t, [
324
+ _ctx.type !== "headless" ? (openBlock(), createElementBlock("div", _hoisted_1$s, [
325
325
  renderSlot(_ctx.$slots, "header", {}, () => [
326
326
  renderSlot(_ctx.$slots, "header-prefix"),
327
327
  _ctx.icon || _ctx.$slots.icon ? (openBlock(), createElementBlock("div", _hoisted_2$j, [
@@ -334,12 +334,12 @@ function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
334
334
  }, null, 8, ["name", "use-font"])) : createCommentVNode("", true)
335
335
  ])
336
336
  ])) : createCommentVNode("", true),
337
- createElementVNode("div", _hoisted_3$d, [
337
+ createElementVNode("div", _hoisted_3$c, [
338
338
  renderSlot(_ctx.$slots, "title", {}, () => [
339
339
  createTextVNode(toDisplayString(_ctx.title), 1)
340
340
  ])
341
341
  ]),
342
- createElementVNode("div", _hoisted_4$c, [
342
+ createElementVNode("div", _hoisted_4$a, [
343
343
  renderSlot(_ctx.$slots, "action")
344
344
  ]),
345
345
  renderSlot(_ctx.$slots, "header-suffix")
@@ -366,9 +366,9 @@ var cardItem_scss_vue_type_style_index_0_src_lang = "";
366
366
  const _sfc_main$D = defineComponent({
367
367
  name: "DaoCardItem"
368
368
  });
369
- const _hoisted_1$s = { class: "dao-card-item" };
369
+ const _hoisted_1$r = { class: "dao-card-item" };
370
370
  function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
371
- return openBlock(), createElementBlock("div", _hoisted_1$s, [
371
+ return openBlock(), createElementBlock("div", _hoisted_1$r, [
372
372
  renderSlot(_ctx.$slots, "default")
373
373
  ]);
374
374
  }
@@ -407,7 +407,15 @@ const breadcrumbKey = Symbol("breadcrumbKey");
407
407
  const ToggleItemKey = Symbol("toggleItem");
408
408
  const ExpansionStateKey = Symbol("expansionProps");
409
409
  var checkbox_vue_vue_type_style_index_0_lang = "";
410
- const modelValueAny = [String, Number, Boolean, Symbol, Object, Set, Array];
410
+ const modelValueAny = [String, Number, Boolean, BigInt, Symbol, Object, Set, Array];
411
+ function getUnrefItem(set, item) {
412
+ const tempArray = Array.from(set);
413
+ const index2 = looseIndexOf(tempArray, item);
414
+ return {
415
+ unrefItem: tempArray[index2],
416
+ index: index2
417
+ };
418
+ }
411
419
  const _sfc_main$C = defineComponent({
412
420
  name: "DaoCheckbox",
413
421
  props: {
@@ -462,7 +470,8 @@ const _sfc_main$C = defineComponent({
462
470
  if (isArray(modelValue)) {
463
471
  currentChecked.value = looseIndexOf(modelValue, value) > -1;
464
472
  } else if (isSet(modelValue)) {
465
- currentChecked.value = modelValue.has(value);
473
+ const { index: index2 } = getUnrefItem(modelValue, value);
474
+ currentChecked.value = index2 > -1;
466
475
  } else {
467
476
  currentChecked.value = looseEqual(modelValue, trueValue);
468
477
  }
@@ -517,7 +526,13 @@ const _sfc_main$C = defineComponent({
517
526
  if (checked) {
518
527
  cloned.add(value);
519
528
  } else {
520
- cloned.delete(value);
529
+ const {
530
+ unrefItem,
531
+ index: index2
532
+ } = getUnrefItem(modelValue, value);
533
+ if (index2 > -1) {
534
+ cloned.delete(unrefItem);
535
+ }
521
536
  }
522
537
  emitModelValue(cloned, event);
523
538
  } else {
@@ -541,13 +556,13 @@ const _sfc_main$C = defineComponent({
541
556
  }
542
557
  }
543
558
  });
544
- const _hoisted_1$r = ["disabled", "indeterminate", "checked"];
559
+ const _hoisted_1$q = ["disabled", "indeterminate", "checked"];
545
560
  const _hoisted_2$i = /* @__PURE__ */ createElementVNode("span", { class: "dao-checkbox-inner" }, null, -1);
546
- const _hoisted_3$c = {
561
+ const _hoisted_3$b = {
547
562
  key: 0,
548
563
  class: "dao-checkbox__label"
549
564
  };
550
- const _hoisted_4$b = {
565
+ const _hoisted_4$9 = {
551
566
  key: 0,
552
567
  class: "dao-checkbox__label-text"
553
568
  };
@@ -570,11 +585,11 @@ function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
570
585
  }, _ctx.$attrs, {
571
586
  checked: _ctx.currentChecked,
572
587
  onChange: _cache[0] || (_cache[0] = (...args) => _ctx.change && _ctx.change(...args))
573
- }), null, 16, _hoisted_1$r),
588
+ }), null, 16, _hoisted_1$q),
574
589
  _hoisted_2$i
575
590
  ], 2),
576
- _ctx.hasLabel ? (openBlock(), createElementBlock("span", _hoisted_3$c, [
577
- _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_4$b, [
591
+ _ctx.hasLabel ? (openBlock(), createElementBlock("span", _hoisted_3$b, [
592
+ _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_4$9, [
578
593
  renderSlot(_ctx.$slots, "default")
579
594
  ])) : createCommentVNode("", true),
580
595
  _ctx.hasHelper ? (openBlock(), createElementBlock("span", _hoisted_5$7, [
@@ -606,7 +621,7 @@ const _sfc_main$B = defineComponent({
606
621
  props.vertical ? "dao-checkbox-group--vertical" : "dao-checkbox-group--horizontal"
607
622
  ]);
608
623
  if (isArray(props.modelValue) || isSet(props.modelValue)) {
609
- provide(checkboxGroupModelValueKey, computed(() => props.modelValue));
624
+ provide(checkboxGroupModelValueKey, readonly(computed(() => props.modelValue)));
610
625
  }
611
626
  const updateGroupModelValueFn = (modelValue) => {
612
627
  emit("update:modelValue", modelValue);
@@ -652,10 +667,10 @@ const _sfc_main$A = defineComponent({
652
667
  };
653
668
  }
654
669
  });
655
- const _hoisted_1$q = { class: "dao-dialog-header" };
670
+ const _hoisted_1$p = { class: "dao-dialog__header" };
656
671
  function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
657
672
  const _component_dao_button = resolveComponent("dao-button");
658
- return openBlock(), createElementBlock("div", _hoisted_1$q, [
673
+ return openBlock(), createElementBlock("div", _hoisted_1$p, [
659
674
  renderSlot(_ctx.$slots, "default", {}, () => [
660
675
  createElementVNode("span", null, [
661
676
  renderSlot(_ctx.$slots, "title", {}, () => [
@@ -709,14 +724,14 @@ const _sfc_main$z = defineComponent({
709
724
  };
710
725
  }
711
726
  });
712
- const _hoisted_1$p = { class: "dao-dialog-footer" };
727
+ const _hoisted_1$o = { class: "dao-dialog__footer" };
713
728
  function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
714
729
  const _component_dao_button = resolveComponent("dao-button");
715
- return openBlock(), createElementBlock("div", _hoisted_1$p, [
730
+ return openBlock(), createElementBlock("div", _hoisted_1$o, [
716
731
  renderSlot(_ctx.$slots, "default", {}, () => [
717
732
  createVNode(_component_dao_button, {
718
733
  type: "ghost",
719
- class: "dao-dialog-footer-cancel-btn",
734
+ class: "dao-dialog__footer__cancel-btn",
720
735
  onClick: _ctx.onCancel
721
736
  }, {
722
737
  default: withCtx(() => [
@@ -739,7 +754,7 @@ function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
739
754
  }
740
755
  var DialogFooter = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$w]]);
741
756
  var dialog_scss_vue_type_style_index_0_src_lang = "";
742
- const DIALOG_NUM_ATTR = "dao-dialog-num";
757
+ const DIALOG_NUM_ATTR = "dao-dialog__num";
743
758
  const DIALOG_MINIMUM_PADDING = "20px";
744
759
  const DIALOG_DEFAULT_PADDING_TOP = "100px";
745
760
  const DIALOG_DEFAULT_PADDING_BOTTOM = "20px";
@@ -838,7 +853,7 @@ const _sfc_main$y = defineComponent({
838
853
  const computedPaddingBottom = computed(() => middle.value ? DIALOG_MINIMUM_PADDING : bottom2.value);
839
854
  const computedContainerClass = computed(() => [
840
855
  containerClass.value,
841
- `dao-dialog__size-${size.value}`
856
+ `dao-dialog--size-${size.value}`
842
857
  ]);
843
858
  const showHeader = computed(() => typeof header2.value === "boolean" ? header2.value : true);
844
859
  const headerTitle = computed(() => typeof header2.value === "string" ? header2.value : "");
@@ -918,7 +933,7 @@ const _sfc_main$y = defineComponent({
918
933
  };
919
934
  }
920
935
  });
921
- const _hoisted_1$o = { class: "dao-dialog-body" };
936
+ const _hoisted_1$n = { class: "dao-dialog__body" };
922
937
  function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
923
938
  const _component_dialog_header = resolveComponent("dialog-header");
924
939
  const _component_dialog_footer = resolveComponent("dialog-footer");
@@ -933,11 +948,11 @@ function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
933
948
  default: withCtx(() => [
934
949
  _ctx.modelValue ? (openBlock(), createElementBlock("div", {
935
950
  key: 0,
936
- class: normalizeClass(["dao-dialog-backdrop", { middle: _ctx.middle }]),
951
+ class: normalizeClass(["dao-dialog__backdrop", { "dao-dialog__backdrop--middle": _ctx.middle }]),
937
952
  onMousedown: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.onWrapperMousedown && _ctx.onWrapperMousedown(...args), ["self"]))
938
953
  }, [
939
954
  createElementVNode("div", {
940
- class: normalizeClass(["dao-dialog-container", _ctx.computedContainerClass]),
955
+ class: normalizeClass(["dao-dialog__container", _ctx.computedContainerClass]),
941
956
  style: normalizeStyle({
942
957
  "margin-top": _ctx.computedPaddingTop,
943
958
  "margin-bottom": _ctx.computedPaddingBottom
@@ -954,7 +969,7 @@ function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
954
969
  ]),
955
970
  _: 3
956
971
  }, 8, ["title", "show-close", "onClose"])) : createCommentVNode("", true),
957
- createElementVNode("div", _hoisted_1$o, [
972
+ createElementVNode("div", _hoisted_1$n, [
958
973
  renderSlot(_ctx.$slots, "default")
959
974
  ]),
960
975
  _ctx.footer ? (openBlock(), createBlock(_component_dialog_footer, {
@@ -1053,7 +1068,7 @@ const _sfc_main$x = defineComponent({
1053
1068
  DaoActionIcon
1054
1069
  },
1055
1070
  props: drawerProps,
1056
- emits: ["close", "confirm"],
1071
+ emits: ["update:modelValue", "close", "confirm"],
1057
1072
  setup(props, { emit }) {
1058
1073
  const { modelValue, size } = toRefs(props);
1059
1074
  const visible = ref(false);
@@ -1089,6 +1104,7 @@ const _sfc_main$x = defineComponent({
1089
1104
  };
1090
1105
  const close = () => {
1091
1106
  visible.value = false;
1107
+ emit("update:modelValue", false);
1092
1108
  emit("close");
1093
1109
  };
1094
1110
  const handleWrapClick = (event) => {
@@ -1109,6 +1125,7 @@ const _sfc_main$x = defineComponent({
1109
1125
  };
1110
1126
  const confirm = () => {
1111
1127
  visible.value = false;
1128
+ emit("update:modelValue", false);
1112
1129
  emit("confirm");
1113
1130
  };
1114
1131
  const setLastFocusElement = () => {
@@ -1152,13 +1169,13 @@ const _sfc_main$x = defineComponent({
1152
1169
  };
1153
1170
  }
1154
1171
  });
1155
- const _hoisted_1$n = { class: "dao-drawer__content" };
1172
+ const _hoisted_1$m = { class: "dao-drawer__content" };
1156
1173
  const _hoisted_2$h = {
1157
1174
  key: 0,
1158
1175
  class: "dao-drawer__header"
1159
1176
  };
1160
- const _hoisted_3$b = { class: "dao-drawer__header-group" };
1161
- const _hoisted_4$a = { class: "dao-drawer__body" };
1177
+ const _hoisted_3$a = { class: "dao-drawer__header-group" };
1178
+ const _hoisted_4$8 = { class: "dao-drawer__body" };
1162
1179
  const _hoisted_5$6 = {
1163
1180
  key: 1,
1164
1181
  class: "dao-drawer__footer"
@@ -1196,10 +1213,10 @@ function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
1196
1213
  withDirectives(createElementVNode("div", {
1197
1214
  class: normalizeClass(_ctx.contentClassList)
1198
1215
  }, [
1199
- createElementVNode("div", _hoisted_1$n, [
1216
+ createElementVNode("div", _hoisted_1$m, [
1200
1217
  !_ctx.hideHeader ? (openBlock(), createElementBlock("div", _hoisted_2$h, [
1201
1218
  renderSlot(_ctx.$slots, "header", {}, () => [
1202
- createElementVNode("div", _hoisted_3$b, [
1219
+ createElementVNode("div", _hoisted_3$a, [
1203
1220
  createElementVNode("span", null, toDisplayString(_ctx.title), 1),
1204
1221
  !_ctx.hideCloseIcon ? (openBlock(), createBlock(_component_dao_action_icon, {
1205
1222
  key: 0,
@@ -1209,7 +1226,7 @@ function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
1209
1226
  ])
1210
1227
  ])
1211
1228
  ])) : createCommentVNode("", true),
1212
- createElementVNode("div", _hoisted_4$a, [
1229
+ createElementVNode("div", _hoisted_4$8, [
1213
1230
  renderSlot(_ctx.$slots, "default")
1214
1231
  ]),
1215
1232
  !_ctx.hideFooter ? (openBlock(), createElementBlock("div", _hoisted_5$6, [
@@ -2494,12 +2511,12 @@ const _sfc_main$w = defineComponent({
2494
2511
  };
2495
2512
  }
2496
2513
  });
2497
- const _hoisted_1$m = ["id", "aria-hidden", "tabindex"];
2514
+ const _hoisted_1$l = ["id", "aria-hidden", "tabindex"];
2498
2515
  const _hoisted_2$g = {
2499
2516
  ref: "arrow",
2500
2517
  class: "dao-popper-arrow"
2501
2518
  };
2502
- const _hoisted_3$a = /* @__PURE__ */ createElementVNode("svg", {
2519
+ const _hoisted_3$9 = /* @__PURE__ */ createElementVNode("svg", {
2503
2520
  class: "dao-popper-arrow-viewbox",
2504
2521
  viewBox: "0 0 15 15"
2505
2522
  }, [
@@ -2513,8 +2530,8 @@ const _hoisted_3$a = /* @__PURE__ */ createElementVNode("svg", {
2513
2530
  d: "M6 7.5L15 -1L15 16Z"
2514
2531
  })
2515
2532
  ], -1);
2516
- const _hoisted_4$9 = [
2517
- _hoisted_3$a
2533
+ const _hoisted_4$7 = [
2534
+ _hoisted_3$9
2518
2535
  ];
2519
2536
  function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
2520
2537
  return openBlock(), createElementBlock("div", {
@@ -2535,10 +2552,10 @@ function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
2535
2552
  }, [
2536
2553
  renderSlot(_ctx.$slots, "default")
2537
2554
  ], 4),
2538
- withDirectives(createElementVNode("div", _hoisted_2$g, _hoisted_4$9, 512), [
2555
+ withDirectives(createElementVNode("div", _hoisted_2$g, _hoisted_4$7, 512), [
2539
2556
  [vShow, _ctx.visibleArrow]
2540
2557
  ])
2541
- ], 42, _hoisted_1$m);
2558
+ ], 42, _hoisted_1$l);
2542
2559
  }
2543
2560
  var PopperContent = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$t]]);
2544
2561
  var PopperProps = {
@@ -2552,7 +2569,7 @@ var PopperProps = {
2552
2569
  },
2553
2570
  appendTo: {
2554
2571
  type: [String, Boolean, Object],
2555
- default: "body"
2572
+ default: "root"
2556
2573
  },
2557
2574
  boundary: {
2558
2575
  type: [String, Object],
@@ -2620,16 +2637,28 @@ function updatePopperOptions(popperInstance, modifiers, popperOptions = {}) {
2620
2637
  _modifiers = [modifiers];
2621
2638
  }
2622
2639
  popperInstance.setOptions((options) => {
2623
- var _a, _b;
2640
+ var _a2, _b2;
2624
2641
  return __spreadProps(__spreadValues(__spreadValues({}, options), popperOptions), {
2625
2642
  modifiers: [
2626
- ...(_a = options.modifiers) != null ? _a : [],
2627
- ...(_b = popperOptions.modifiers) != null ? _b : [],
2643
+ ...(_a2 = options.modifiers) != null ? _a2 : [],
2644
+ ...(_b2 = popperOptions.modifiers) != null ? _b2 : [],
2628
2645
  ..._modifiers
2629
2646
  ]
2630
2647
  });
2631
2648
  });
2632
2649
  }
2650
+ function getActualRoot(app) {
2651
+ var _a2, _b2, _c, _d;
2652
+ let internalRoot = "body";
2653
+ if (!app) {
2654
+ return internalRoot;
2655
+ }
2656
+ const rootNode = (_c = (_b2 = (_a2 = app == null ? void 0 : app.root) == null ? void 0 : _a2.vnode) == null ? void 0 : _b2.el) == null ? void 0 : _c.parentNode.getRootNode();
2657
+ if (rootNode) {
2658
+ internalRoot = (_d = rootNode.body) != null ? _d : rootNode;
2659
+ }
2660
+ return internalRoot;
2661
+ }
2633
2662
  const _sfc_main$v = defineComponent({
2634
2663
  name: "DaoPopper",
2635
2664
  components: {
@@ -2657,12 +2686,26 @@ const _sfc_main$v = defineComponent({
2657
2686
  const isOpen = ref(false);
2658
2687
  const actualAppendTo = ref("body");
2659
2688
  const isTelDisabled = ref(false);
2660
- const unrefAppendTo = unref(appendTo);
2661
- if (unrefAppendTo === false) {
2662
- isTelDisabled.value = true;
2663
- } else {
2664
- actualAppendTo.value = unrefAppendTo;
2665
- }
2689
+ watch(appendTo, () => {
2690
+ const unrefAppendTo = unref(appendTo);
2691
+ if (unrefAppendTo === false) {
2692
+ isTelDisabled.value = true;
2693
+ } else if (unrefAppendTo === "root") {
2694
+ const vm = getCurrentInstance();
2695
+ if (vm == null ? void 0 : vm.root.isMounted) {
2696
+ actualAppendTo.value = getActualRoot(vm);
2697
+ } else {
2698
+ isTelDisabled.value = true;
2699
+ actualAppendTo.value = "body";
2700
+ onMounted(() => {
2701
+ actualAppendTo.value = getActualRoot(vm);
2702
+ isTelDisabled.value = false;
2703
+ });
2704
+ }
2705
+ } else {
2706
+ actualAppendTo.value = unrefAppendTo;
2707
+ }
2708
+ }, { immediate: true });
2666
2709
  const instance = getCurrentInstance();
2667
2710
  let popperInstance;
2668
2711
  let _targetNode;
@@ -2670,8 +2713,8 @@ const _sfc_main$v = defineComponent({
2670
2713
  let _arrowNode;
2671
2714
  let _scheduleTimer;
2672
2715
  const themeClass = computed(() => {
2673
- var _a, _b;
2674
- return (_b = (_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.$options.daoPopperTheme) != null ? _b : "";
2716
+ var _a2, _b2;
2717
+ return (_b2 = (_a2 = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a2.$options.daoPopperTheme) != null ? _b2 : "";
2675
2718
  });
2676
2719
  const showDelay = computed(() => {
2677
2720
  const unrefDelay = unref(delay);
@@ -2688,7 +2731,7 @@ const _sfc_main$v = defineComponent({
2688
2731
  return unrefDelay || 0;
2689
2732
  });
2690
2733
  const createPopper$1 = async () => {
2691
- var _a;
2734
+ var _a2;
2692
2735
  if (popperInstance == null ? void 0 : popperInstance.destroy) {
2693
2736
  popperInstance.destroy();
2694
2737
  }
@@ -2729,7 +2772,7 @@ const _sfc_main$v = defineComponent({
2729
2772
  }
2730
2773
  });
2731
2774
  }
2732
- modifiers.push(...((_a = unref(popperOptions)) == null ? void 0 : _a.modifiers) || []);
2775
+ modifiers.push(...((_a2 = unref(popperOptions)) == null ? void 0 : _a2.modifiers) || []);
2733
2776
  const ppOptions = __spreadProps(__spreadValues({
2734
2777
  strategy: "fixed",
2735
2778
  placement: unref(placement)
@@ -2855,10 +2898,10 @@ const _sfc_main$v = defineComponent({
2855
2898
  fn2(_popperNode, "mouseleave", hide);
2856
2899
  break;
2857
2900
  case "focus":
2858
- fn2(_targetNode, "focus", show);
2859
- fn2(_popperNode, "focus", show);
2860
- fn2(_targetNode, "blur", hide);
2861
- fn2(_popperNode, "blur", hide);
2901
+ fn2(_targetNode, "focusin", show);
2902
+ fn2(_popperNode, "focusin", show);
2903
+ fn2(_targetNode, "focusout", hide);
2904
+ fn2(_popperNode, "focusout", hide);
2862
2905
  break;
2863
2906
  }
2864
2907
  });
@@ -2870,12 +2913,12 @@ const _sfc_main$v = defineComponent({
2870
2913
  operateEventListeners(off);
2871
2914
  };
2872
2915
  const init = () => {
2873
- var _a, _b, _c, _d;
2916
+ var _a2, _b2, _c, _d;
2874
2917
  if (!slots.default) {
2875
2918
  throw new Error("Trigger must be provided");
2876
2919
  }
2877
- _targetNode = (_a = unref(reference2)) == null ? void 0 : _a.firstElementChild;
2878
- _popperNode = (_b = unref(popper2)) == null ? void 0 : _b.$el;
2920
+ _targetNode = (_a2 = unref(reference2)) == null ? void 0 : _a2.firstElementChild;
2921
+ _popperNode = (_b2 = unref(popper2)) == null ? void 0 : _b2.$el;
2879
2922
  _arrowNode = (_d = (_c = unref(popper2)) == null ? void 0 : _c.$refs) == null ? void 0 : _d.arrow;
2880
2923
  addEventListeners();
2881
2924
  if (unref(isOpen) || unref(modelValue)) {
@@ -3043,7 +3086,7 @@ const _sfc_main$u = defineComponent({
3043
3086
  },
3044
3087
  appendTo: {
3045
3088
  type: [String, Boolean, Object],
3046
- default: "body"
3089
+ default: "root"
3047
3090
  },
3048
3091
  placement: {
3049
3092
  type: String,
@@ -3069,11 +3112,11 @@ const _sfc_main$u = defineComponent({
3069
3112
  const realOffset = computed(() => realTrigger.value === "hover" ? 0 : offset2.value);
3070
3113
  const parentHideFn = inject("hide", NOOP);
3071
3114
  const hide = () => {
3072
- var _a;
3115
+ var _a2;
3073
3116
  if (realTrigger.value === "manual") {
3074
3117
  return;
3075
3118
  }
3076
- (_a = popper2.value) == null ? void 0 : _a.hide();
3119
+ (_a2 = popper2.value) == null ? void 0 : _a2.hide();
3077
3120
  parentHideFn == null ? void 0 : parentHideFn();
3078
3121
  };
3079
3122
  provide("hide", hide);
@@ -3086,7 +3129,7 @@ const _sfc_main$u = defineComponent({
3086
3129
  };
3087
3130
  }
3088
3131
  });
3089
- const _hoisted_1$l = { tabindex: "0" };
3132
+ const _hoisted_1$k = { tabindex: "0" };
3090
3133
  function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
3091
3134
  const _component_dao_popper = resolveComponent("dao-popper");
3092
3135
  return openBlock(), createBlock(_component_dao_popper, {
@@ -3097,13 +3140,14 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
3097
3140
  "popper-class": "dao-dropdown-menu-popper",
3098
3141
  "visible-arrow": false,
3099
3142
  offset: _ctx.realOffset,
3100
- "model-value": _ctx.visible
3143
+ "model-value": _ctx.visible,
3144
+ transition: "dao-fade-slide-default"
3101
3145
  }, {
3102
3146
  content: withCtx(() => [
3103
3147
  renderSlot(_ctx.$slots, "menu")
3104
3148
  ]),
3105
3149
  default: withCtx(() => [
3106
- createElementVNode("div", _hoisted_1$l, [
3150
+ createElementVNode("div", _hoisted_1$k, [
3107
3151
  renderSlot(_ctx.$slots, "default")
3108
3152
  ])
3109
3153
  ]),
@@ -3115,9 +3159,9 @@ var dropdownMenu_vue_vue_type_style_index_0_lang = "";
3115
3159
  const _sfc_main$t = defineComponent({
3116
3160
  name: "DaoDropdownMenu"
3117
3161
  });
3118
- const _hoisted_1$k = { class: "dao-dropdown-menu" };
3162
+ const _hoisted_1$j = { class: "dao-dropdown-menu" };
3119
3163
  function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
3120
- return openBlock(), createElementBlock("ul", _hoisted_1$k, [
3164
+ return openBlock(), createElementBlock("ul", _hoisted_1$j, [
3121
3165
  renderSlot(_ctx.$slots, "default")
3122
3166
  ]);
3123
3167
  }
@@ -3272,9 +3316,9 @@ const _sfc_main$r = defineComponent({
3272
3316
  };
3273
3317
  }
3274
3318
  });
3275
- const _hoisted_1$j = { class: "dao-expansion" };
3319
+ const _hoisted_1$i = { class: "dao-expansion" };
3276
3320
  function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
3277
- return openBlock(), createElementBlock("div", _hoisted_1$j, [
3321
+ return openBlock(), createElementBlock("div", _hoisted_1$i, [
3278
3322
  renderSlot(_ctx.$slots, "default")
3279
3323
  ]);
3280
3324
  }
@@ -3355,10 +3399,10 @@ const _sfc_main$q = defineComponent({
3355
3399
  };
3356
3400
  }
3357
3401
  });
3358
- const _hoisted_1$i = { class: "dao-expansion-item-icon-container" };
3402
+ const _hoisted_1$h = { class: "dao-expansion-item-icon-container" };
3359
3403
  const _hoisted_2$f = { class: "dao-expansion-item-title-container" };
3360
- const _hoisted_3$9 = { class: "dao-expansion-item-title dao-exp-ellipsis" };
3361
- const _hoisted_4$8 = { class: "dao-expansion-item-description dao-exp-ellipsis" };
3404
+ const _hoisted_3$8 = { class: "dao-expansion-item-title dao-exp-ellipsis" };
3405
+ const _hoisted_4$6 = { class: "dao-expansion-item-description dao-exp-ellipsis" };
3362
3406
  const _hoisted_5$5 = { class: "dao-expansion-item-content-container" };
3363
3407
  const _hoisted_6$3 = { class: "dao-expansion-item-content" };
3364
3408
  function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
@@ -3372,7 +3416,7 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
3372
3416
  class: "dao-expansion-item-header",
3373
3417
  onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onItemClick && _ctx.onItemClick(...args))
3374
3418
  }, [
3375
- createElementVNode("div", _hoisted_1$i, [
3419
+ createElementVNode("div", _hoisted_1$h, [
3376
3420
  createVNode(_component_dao_icon, {
3377
3421
  name: "icon-dropdown-line",
3378
3422
  class: "dao-expansion-item-icon",
@@ -3380,12 +3424,12 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
3380
3424
  })
3381
3425
  ]),
3382
3426
  createElementVNode("div", _hoisted_2$f, [
3383
- createElementVNode("div", _hoisted_3$9, [
3427
+ createElementVNode("div", _hoisted_3$8, [
3384
3428
  renderSlot(_ctx.$slots, "title", {}, () => [
3385
3429
  createTextVNode(toDisplayString(_ctx.title), 1)
3386
3430
  ])
3387
3431
  ]),
3388
- createElementVNode("div", _hoisted_4$8, [
3432
+ createElementVNode("div", _hoisted_4$6, [
3389
3433
  renderSlot(_ctx.$slots, "description", {}, () => [
3390
3434
  createTextVNode(toDisplayString(_ctx.description), 1)
3391
3435
  ])
@@ -3455,7 +3499,9 @@ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
3455
3499
  error: "dao-form-item__error-message"
3456
3500
  },
3457
3501
  wrapper: {
3502
+ text: "dao-form-item__text-wrapper",
3458
3503
  radio: "dao-form-item__radio-wrapper",
3504
+ checkbox: "dao-form-item__checkbox-wrapper",
3459
3505
  switch: "dao-form-item__switch-wrapper",
3460
3506
  footer: "dao-form-item__footer-wrapper"
3461
3507
  }
@@ -3486,6 +3532,10 @@ const _sfc_main$n = defineComponent({
3486
3532
  type: String,
3487
3533
  default: ""
3488
3534
  },
3535
+ required: {
3536
+ type: Boolean,
3537
+ default: false
3538
+ },
3489
3539
  paddingTop: {
3490
3540
  type: [Number, String],
3491
3541
  default: 0
@@ -3524,30 +3574,31 @@ const _sfc_main$n = defineComponent({
3524
3574
  };
3525
3575
  }
3526
3576
  });
3527
- const _hoisted_1$h = { class: "dao-form-item" };
3528
- const _hoisted_2$e = {
3577
+ const _hoisted_1$g = {
3529
3578
  key: 0,
3530
3579
  class: "dao-form-item__label-icon-wrapper"
3531
3580
  };
3532
- const _hoisted_3$8 = { class: "dao-form-item__label-icon-label" };
3533
- const _hoisted_4$7 = /* @__PURE__ */ createElementVNode("i", { class: "dao-form-item__label-icon icon-unknow" }, null, -1);
3581
+ const _hoisted_2$e = { class: "dao-form-item__label-icon-label" };
3582
+ const _hoisted_3$7 = /* @__PURE__ */ createElementVNode("i", { class: "dao-form-item__label-icon icon-unknow" }, null, -1);
3534
3583
  function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
3535
3584
  const _component_dao_tooltip = resolveComponent("dao-tooltip");
3536
- return openBlock(), createElementBlock("div", _hoisted_1$h, [
3585
+ return openBlock(), createElementBlock("div", {
3586
+ class: normalizeClass(["dao-form-item", { "is-required": _ctx.required }])
3587
+ }, [
3537
3588
  createElementVNode("div", {
3538
3589
  class: "dao-form-item__label",
3539
3590
  style: normalizeStyle(_ctx.labelStyle)
3540
3591
  }, [
3541
3592
  renderSlot(_ctx.$slots, "label", {}, () => [
3542
3593
  createTextVNode(toDisplayString(!_ctx.iconMessage ? _ctx.label : ""), 1),
3543
- !!_ctx.iconMessage ? (openBlock(), createElementBlock("div", _hoisted_2$e, [
3544
- createElementVNode("span", _hoisted_3$8, toDisplayString(_ctx.label), 1),
3594
+ !!_ctx.iconMessage ? (openBlock(), createElementBlock("div", _hoisted_1$g, [
3595
+ createElementVNode("span", _hoisted_2$e, toDisplayString(_ctx.label), 1),
3545
3596
  createVNode(_component_dao_tooltip, {
3546
3597
  content: _ctx.iconMessage,
3547
3598
  placement: "top"
3548
3599
  }, {
3549
3600
  default: withCtx(() => [
3550
- _hoisted_4$7
3601
+ _hoisted_3$7
3551
3602
  ]),
3552
3603
  _: 1
3553
3604
  }, 8, ["content"])
@@ -3560,7 +3611,7 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
3560
3611
  }, [
3561
3612
  renderSlot(_ctx.$slots, "default")
3562
3613
  ], 4)
3563
- ]);
3614
+ ], 2);
3564
3615
  }
3565
3616
  var formItem = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$l]]);
3566
3617
  var formGroup_vue_vue_type_style_index_0_lang = "";
@@ -3573,10 +3624,10 @@ const _sfc_main$m = defineComponent({
3573
3624
  }
3574
3625
  }
3575
3626
  });
3576
- const _hoisted_1$g = { class: "dao-form-group" };
3627
+ const _hoisted_1$f = { class: "dao-form-group" };
3577
3628
  const _hoisted_2$d = { class: "dao-form-group__title" };
3578
3629
  function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
3579
- return openBlock(), createElementBlock("div", _hoisted_1$g, [
3630
+ return openBlock(), createElementBlock("div", _hoisted_1$f, [
3580
3631
  createElementVNode("div", _hoisted_2$d, [
3581
3632
  renderSlot(_ctx.$slots, "title", {}, () => [
3582
3633
  createTextVNode(toDisplayString(_ctx.title), 1)
@@ -3682,8 +3733,8 @@ const _sfc_main$k = defineComponent({
3682
3733
  setup(props) {
3683
3734
  const parent = inject(breadcrumbKey, null);
3684
3735
  const separator = computed(() => {
3685
- var _a;
3686
- return (_a = parent == null ? void 0 : parent.props) == null ? void 0 : _a.separator;
3736
+ var _a2;
3737
+ return (_a2 = parent == null ? void 0 : parent.props) == null ? void 0 : _a2.separator;
3687
3738
  });
3688
3739
  const handleClick = () => {
3689
3740
  const to = props == null ? void 0 : props.to;
@@ -3748,7 +3799,7 @@ const _sfc_main$j = defineComponent({
3748
3799
  }
3749
3800
  });
3750
3801
  function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
3751
- var _a;
3802
+ var _a2;
3752
3803
  const _component_dao_icon = resolveComponent("dao-icon");
3753
3804
  const _component_dao_breadcrumb_item = resolveComponent("dao-breadcrumb-item");
3754
3805
  return openBlock(), createElementBlock("div", {
@@ -3768,7 +3819,7 @@ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
3768
3819
  }, null, 8, ["name"])
3769
3820
  ])
3770
3821
  ], 2)) : createCommentVNode("", true),
3771
- ((_a = _ctx.list) == null ? void 0 : _a.length) ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.list, (item, index2) => {
3822
+ ((_a2 = _ctx.list) == null ? void 0 : _a2.length) ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.list, (item, index2) => {
3772
3823
  return openBlock(), createBlock(_component_dao_breadcrumb_item, {
3773
3824
  key: index2,
3774
3825
  label: item.label,
@@ -3848,6 +3899,9 @@ var inputProps = {
3848
3899
  var input_vue_vue_type_style_index_0_lang = "";
3849
3900
  const _sfc_main$i = defineComponent({
3850
3901
  name: "DaoInput",
3902
+ components: {
3903
+ DaoIcon
3904
+ },
3851
3905
  inheritAttrs: false,
3852
3906
  props: inputProps,
3853
3907
  emits: ["update:modelValue", "input", "change", "blur", "focus", "after-reset"],
@@ -3892,12 +3946,31 @@ const _sfc_main$i = defineComponent({
3892
3946
  `${prefixCls}--size-${size.value}`,
3893
3947
  {
3894
3948
  [`${prefixCls}--search`]: type.value === "search",
3949
+ [`${prefixCls}--password`]: type.value === "password",
3895
3950
  [`${prefixCls}--${status.value}`]: ["error", "success", "loading"].includes(status.value),
3896
3951
  [`${prefixCls}--borderless`]: borderless.value,
3897
3952
  [`${prefixCls}--block`]: block.value,
3898
3953
  [`${prefixCls}--with-append`]: !!append.value
3899
3954
  }
3900
3955
  ]);
3956
+ const isShowPassword = ref(false);
3957
+ const inputType = computed(() => {
3958
+ if (type.value === "password") {
3959
+ if (isShowPassword.value) {
3960
+ return "text";
3961
+ }
3962
+ }
3963
+ return type.value;
3964
+ });
3965
+ function toggleShowPassword() {
3966
+ isShowPassword.value = !isShowPassword.value;
3967
+ }
3968
+ const passwordIcon = computed(() => {
3969
+ if (isShowPassword.value) {
3970
+ return "icon-eye";
3971
+ }
3972
+ return "icon-eye-slash";
3973
+ });
3901
3974
  const statusClasses = computed(() => statusMap[status.value]);
3902
3975
  const setCurrentValue = (val) => {
3903
3976
  if (val === currentValue.value) {
@@ -3918,17 +3991,17 @@ const _sfc_main$i = defineComponent({
3918
3991
  emit("change", val);
3919
3992
  };
3920
3993
  const resetCurrentVal = () => {
3921
- var _a;
3994
+ var _a2;
3922
3995
  if (disabled.value || type.value !== "search") {
3923
3996
  return;
3924
3997
  }
3925
3998
  updateModel("");
3926
3999
  emit("after-reset");
3927
- (_a = input2.value) == null ? void 0 : _a.focus();
4000
+ (_a2 = input2.value) == null ? void 0 : _a2.focus();
3928
4001
  };
3929
4002
  const getInputRealNumber = (val, fixedPointNum) => parseFloat(val.toFixed(fixedPointNum));
3930
4003
  const changeNumberValue = (changeType) => {
3931
- var _a;
4004
+ var _a2;
3932
4005
  if (type.value !== "number") {
3933
4006
  return;
3934
4007
  }
@@ -3957,7 +4030,7 @@ const _sfc_main$i = defineComponent({
3957
4030
  setValue = minimum;
3958
4031
  }
3959
4032
  updateModel(getInputRealNumber(setValue, stepPointNum));
3960
- (_a = input2.value) == null ? void 0 : _a.focus();
4033
+ (_a2 = input2.value) == null ? void 0 : _a2.focus();
3961
4034
  if (!counterTimeout && !counterInterval) {
3962
4035
  counterTimeout = window.setTimeout(() => {
3963
4036
  counterInterval = window.setInterval(() => changeNumberValue(changeType), 100);
@@ -3965,7 +4038,7 @@ const _sfc_main$i = defineComponent({
3965
4038
  }
3966
4039
  };
3967
4040
  const onInputNumberMouseup = (event) => {
3968
- var _a;
4041
+ var _a2;
3969
4042
  if (isChangingNumber.value) {
3970
4043
  event.preventDefault();
3971
4044
  }
@@ -3980,7 +4053,7 @@ const _sfc_main$i = defineComponent({
3980
4053
  counterInterval = null;
3981
4054
  isChangingNumber.value = false;
3982
4055
  if (onEvents) {
3983
- (_a = input2.value) == null ? void 0 : _a.focus();
4056
+ (_a2 = input2.value) == null ? void 0 : _a2.focus();
3984
4057
  }
3985
4058
  };
3986
4059
  const inputAttrs = computed(() => {
@@ -4028,11 +4101,14 @@ const _sfc_main$i = defineComponent({
4028
4101
  changeNumberValue,
4029
4102
  isIncreaseDisabled,
4030
4103
  isDecreaseDisabled,
4031
- isChangingNumber
4104
+ isChangingNumber,
4105
+ inputType,
4106
+ passwordIcon,
4107
+ toggleShowPassword
4032
4108
  };
4033
4109
  }
4034
4110
  });
4035
- const _hoisted_1$f = {
4111
+ const _hoisted_1$e = {
4036
4112
  key: 0,
4037
4113
  class: "dao-input-prepend"
4038
4114
  };
@@ -4040,9 +4116,9 @@ const _hoisted_2$c = {
4040
4116
  key: 0,
4041
4117
  class: "dao-input-prefix"
4042
4118
  };
4043
- const _hoisted_3$7 = ["type", "disabled", "value"];
4044
- const _hoisted_4$6 = {
4045
- key: 3,
4119
+ const _hoisted_3$6 = ["type", "disabled", "value"];
4120
+ const _hoisted_4$5 = {
4121
+ key: 4,
4046
4122
  class: "dao-input-suffix"
4047
4123
  };
4048
4124
  const _hoisted_5$4 = {
@@ -4050,11 +4126,12 @@ const _hoisted_5$4 = {
4050
4126
  class: "dao-input-append"
4051
4127
  };
4052
4128
  function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
4129
+ const _component_dao_icon = resolveComponent("dao-icon");
4053
4130
  return openBlock(), createElementBlock("div", {
4054
4131
  class: normalizeClass(_ctx.wrapClasses)
4055
4132
  }, [
4056
4133
  renderSlot(_ctx.$slots, "prepend", {}, () => [
4057
- _ctx.prepend ? (openBlock(), createElementBlock("div", _hoisted_1$f, toDisplayString(_ctx.prepend), 1)) : createCommentVNode("", true)
4134
+ _ctx.prepend ? (openBlock(), createElementBlock("div", _hoisted_1$e, toDisplayString(_ctx.prepend), 1)) : createCommentVNode("", true)
4058
4135
  ]),
4059
4136
  createElementVNode("div", {
4060
4137
  class: normalizeClass(["dao-input-inner", { "dao-input__changing-number": _ctx.isChangingNumber }])
@@ -4070,11 +4147,11 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
4070
4147
  ref: "input",
4071
4148
  class: _ctx.inputClasses
4072
4149
  }, _ctx.inputAttrs, {
4073
- type: _ctx.type,
4150
+ type: _ctx.inputType,
4074
4151
  disabled: _ctx.disabled,
4075
4152
  value: _ctx.currentValue,
4076
4153
  onKeyup: _cache[0] || (_cache[0] = withKeys((...args) => _ctx.resetCurrentVal && _ctx.resetCurrentVal(...args), ["esc"]))
4077
- }), null, 16, _hoisted_3$7),
4154
+ }), null, 16, _hoisted_3$6),
4078
4155
  _ctx.type === "number" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
4079
4156
  createElementVNode("i", {
4080
4157
  class: normalizeClass([
@@ -4095,6 +4172,13 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
4095
4172
  onMousedown: _cache[2] || (_cache[2] = ($event) => _ctx.changeNumberValue("decrease"))
4096
4173
  }, null, 34)
4097
4174
  ], 64)) : createCommentVNode("", true),
4175
+ _ctx.type === "password" ? (openBlock(), createBlock(_component_dao_icon, {
4176
+ key: 3,
4177
+ "use-font": "",
4178
+ class: "dao-input-password-icon",
4179
+ name: _ctx.passwordIcon,
4180
+ onClick: _ctx.toggleShowPassword
4181
+ }, null, 8, ["name", "onClick"])) : createCommentVNode("", true),
4098
4182
  withDirectives(createElementVNode("i", {
4099
4183
  class: normalizeClass(["dao-input-close-icon", "icon-sys-error", { "dao-input__active": _ctx.isFocus }]),
4100
4184
  onClick: _cache[3] || (_cache[3] = ($event) => _ctx.resetCurrentVal())
@@ -4102,11 +4186,11 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
4102
4186
  [vShow, _ctx.clearable]
4103
4187
  ]),
4104
4188
  withDirectives(createElementVNode("i", {
4105
- class: normalizeClass(_ctx.statusClasses)
4189
+ class: normalizeClass([_ctx.statusClasses, "dao-input-status-icon"])
4106
4190
  }, null, 2), [
4107
4191
  [vShow, ["error", "success", "loading"].includes(_ctx.status)]
4108
4192
  ]),
4109
- _ctx.slots.suffix ? (openBlock(), createElementBlock("div", _hoisted_4$6, [
4193
+ _ctx.slots.suffix ? (openBlock(), createElementBlock("div", _hoisted_4$5, [
4110
4194
  renderSlot(_ctx.$slots, "suffix")
4111
4195
  ])) : createCommentVNode("", true)
4112
4196
  ], 2),
@@ -4186,13 +4270,13 @@ const _sfc_main$h = defineComponent({
4186
4270
  };
4187
4271
  }
4188
4272
  });
4189
- const _hoisted_1$e = { class: "dao-message-icon" };
4273
+ const _hoisted_1$d = { class: "dao-message-icon" };
4190
4274
  const _hoisted_2$b = { class: "dao-message-section" };
4191
- const _hoisted_3$6 = {
4275
+ const _hoisted_3$5 = {
4192
4276
  key: 0,
4193
4277
  class: "dao-message-title"
4194
4278
  };
4195
- const _hoisted_4$5 = {
4279
+ const _hoisted_4$4 = {
4196
4280
  key: 0,
4197
4281
  class: "dao-message-content"
4198
4282
  };
@@ -4207,7 +4291,7 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
4207
4291
  createElementVNode("div", {
4208
4292
  class: normalizeClass(["dao-message-inner", { "dao-message-inner-without-close": !_ctx.isCloseShow }])
4209
4293
  }, [
4210
- createElementVNode("div", _hoisted_1$e, [
4294
+ createElementVNode("div", _hoisted_1$d, [
4211
4295
  renderSlot(_ctx.$slots, "icon", {}, () => [
4212
4296
  createElementVNode("i", {
4213
4297
  class: normalizeClass(`icon-sys-${_ctx.type} dao-message-icon-general dao-message-icon-${_ctx.type}`)
@@ -4217,10 +4301,10 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
4217
4301
  createElementVNode("div", _hoisted_2$b, [
4218
4302
  renderSlot(_ctx.$slots, "section", {}, () => [
4219
4303
  renderSlot(_ctx.$slots, "title", { className: "dao-message-title" }, () => [
4220
- _ctx.title ? (openBlock(), createElementBlock("div", _hoisted_3$6, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true)
4304
+ _ctx.title ? (openBlock(), createElementBlock("div", _hoisted_3$5, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true)
4221
4305
  ]),
4222
4306
  renderSlot(_ctx.$slots, "default", { className: "dao-message-content" }, () => [
4223
- _ctx.content ? (openBlock(), createElementBlock("div", _hoisted_4$5, toDisplayString(_ctx.content), 1)) : createCommentVNode("", true)
4307
+ _ctx.content ? (openBlock(), createElementBlock("div", _hoisted_4$4, toDisplayString(_ctx.content), 1)) : createCommentVNode("", true)
4224
4308
  ])
4225
4309
  ])
4226
4310
  ]),
@@ -4403,10 +4487,10 @@ const _sfc_main$g = defineComponent({
4403
4487
  });
4404
4488
  }
4405
4489
  });
4406
- const _hoisted_1$d = { class: "dao-nav-bar" };
4490
+ const _hoisted_1$c = { class: "dao-nav-bar" };
4407
4491
  const _hoisted_2$a = { class: "dao-nav" };
4408
4492
  function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
4409
- return openBlock(), createElementBlock("nav", _hoisted_1$d, [
4493
+ return openBlock(), createElementBlock("nav", _hoisted_1$c, [
4410
4494
  renderSlot(_ctx.$slots, "header"),
4411
4495
  createElementVNode("ul", _hoisted_2$a, [
4412
4496
  renderSlot(_ctx.$slots, "default")
@@ -4449,7 +4533,7 @@ const _sfc_main$f = defineComponent({
4449
4533
  };
4450
4534
  }
4451
4535
  });
4452
- const _hoisted_1$c = { class: "dao-nav__head-text dao-nav-text" };
4536
+ const _hoisted_1$b = { class: "dao-nav__head-text dao-nav-text" };
4453
4537
  function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
4454
4538
  const _component_dao_icon = resolveComponent("dao-icon");
4455
4539
  return openBlock(), createElementBlock("li", {
@@ -4465,7 +4549,7 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
4465
4549
  onClick: _ctx.handleClickBack,
4466
4550
  onKeyup: withKeys(withModifiers(_ctx.handleClickBack, ["stop"]), ["esc"])
4467
4551
  }, null, 8, ["name", "use-font", "onClick", "onKeyup"])) : createCommentVNode("", true),
4468
- createElementVNode("span", _hoisted_1$c, toDisplayString(_ctx.title), 1)
4552
+ createElementVNode("span", _hoisted_1$b, toDisplayString(_ctx.title), 1)
4469
4553
  ])
4470
4554
  ], 2);
4471
4555
  }
@@ -4551,7 +4635,7 @@ const _sfc_main$e = defineComponent({
4551
4635
  };
4552
4636
  }
4553
4637
  });
4554
- const _hoisted_1$b = { class: "dao-nav-slot" };
4638
+ const _hoisted_1$a = { class: "dao-nav-slot" };
4555
4639
  const _hoisted_2$9 = { class: "dao-nav__item-text dao-nav-text" };
4556
4640
  function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
4557
4641
  const _component_dao_icon = resolveComponent("dao-icon");
@@ -4564,7 +4648,7 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
4564
4648
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args)),
4565
4649
  onKeyup: _cache[1] || (_cache[1] = withKeys((...args) => _ctx.handleClick && _ctx.handleClick(...args), ["enter"]))
4566
4650
  }, [
4567
- createElementVNode("div", _hoisted_1$b, [
4651
+ createElementVNode("div", _hoisted_1$a, [
4568
4652
  renderSlot(_ctx.$slots, "default", {}, () => [
4569
4653
  _ctx.showIcon ? (openBlock(), createBlock(_component_dao_icon, {
4570
4654
  key: 0,
@@ -4701,13 +4785,13 @@ const _sfc_main$d = defineComponent({
4701
4785
  };
4702
4786
  }
4703
4787
  });
4704
- const _hoisted_1$a = { class: "dao-nav-slot" };
4788
+ const _hoisted_1$9 = { class: "dao-nav-slot" };
4705
4789
  const _hoisted_2$8 = { class: "dao-nav__sub-text dao-nav-text" };
4706
- const _hoisted_3$5 = {
4790
+ const _hoisted_3$4 = {
4707
4791
  key: 0,
4708
4792
  class: "icon-dropdown-line dao-nav__sub__icon-fold"
4709
4793
  };
4710
- const _hoisted_4$4 = /* @__PURE__ */ createElementVNode("span", { class: "dao-nav__sub-gap" }, null, -1);
4794
+ const _hoisted_4$3 = /* @__PURE__ */ createElementVNode("span", { class: "dao-nav__sub-gap" }, null, -1);
4711
4795
  const _hoisted_5$3 = { class: "dao-nav dao-nav-inner" };
4712
4796
  const _hoisted_6$2 = /* @__PURE__ */ createElementVNode("span", { class: "dao-nav__sub-gap" }, null, -1);
4713
4797
  function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
@@ -4721,7 +4805,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
4721
4805
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args)),
4722
4806
  onKeyup: _cache[1] || (_cache[1] = withKeys((...args) => _ctx.handleClick && _ctx.handleClick(...args), ["enter"]))
4723
4807
  }, [
4724
- createElementVNode("div", _hoisted_1$a, [
4808
+ createElementVNode("div", _hoisted_1$9, [
4725
4809
  renderSlot(_ctx.$slots, "title", {}, () => [
4726
4810
  _ctx.showIcon ? (openBlock(), createBlock(_component_dao_icon, {
4727
4811
  key: 0,
@@ -4732,12 +4816,12 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
4732
4816
  createElementVNode("span", _hoisted_2$8, toDisplayString(_ctx.title), 1)
4733
4817
  ])
4734
4818
  ]),
4735
- _ctx.fold ? (openBlock(), createElementBlock("i", _hoisted_3$5)) : createCommentVNode("", true)
4819
+ _ctx.fold ? (openBlock(), createElementBlock("i", _hoisted_3$4)) : createCommentVNode("", true)
4736
4820
  ], 34),
4737
4821
  createVNode(Transition, { name: "dao-nav" }, {
4738
4822
  default: withCtx(() => [
4739
4823
  withDirectives(createElementVNode("div", null, [
4740
- _hoisted_4$4,
4824
+ _hoisted_4$3,
4741
4825
  createElementVNode("ul", _hoisted_5$3, [
4742
4826
  renderSlot(_ctx.$slots, "default")
4743
4827
  ]),
@@ -4786,14 +4870,105 @@ const paginationProps = {
4786
4870
  pageSizerWidth: {
4787
4871
  type: Number,
4788
4872
  default: 110
4873
+ },
4874
+ layout: {
4875
+ type: Array,
4876
+ default: ["total", "pager", "sizer"]
4877
+ }
4878
+ };
4879
+ function tryOnScopeDispose(fn2) {
4880
+ if (getCurrentScope()) {
4881
+ onScopeDispose(fn2);
4882
+ return true;
4789
4883
  }
4884
+ return false;
4885
+ }
4886
+ const isClient = typeof window !== "undefined";
4887
+ const isString = (val) => typeof val === "string";
4888
+ const noop = () => {
4790
4889
  };
4890
+ function unrefElement(elRef) {
4891
+ var _a2;
4892
+ const plain = unref(elRef);
4893
+ return (_a2 = plain == null ? void 0 : plain.$el) != null ? _a2 : plain;
4894
+ }
4895
+ const defaultWindow = isClient ? window : void 0;
4896
+ isClient ? window.document : void 0;
4897
+ isClient ? window.navigator : void 0;
4898
+ isClient ? window.location : void 0;
4899
+ function useEventListener(...args) {
4900
+ let target;
4901
+ let event;
4902
+ let listener;
4903
+ let options;
4904
+ if (isString(args[0])) {
4905
+ [event, listener, options] = args;
4906
+ target = defaultWindow;
4907
+ } else {
4908
+ [target, event, listener, options] = args;
4909
+ }
4910
+ if (!target)
4911
+ return noop;
4912
+ let cleanup = noop;
4913
+ const stopWatch = watch(() => unrefElement(target), (el) => {
4914
+ cleanup();
4915
+ if (!el)
4916
+ return;
4917
+ el.addEventListener(event, listener, options);
4918
+ cleanup = () => {
4919
+ el.removeEventListener(event, listener, options);
4920
+ cleanup = noop;
4921
+ };
4922
+ }, { immediate: true, flush: "post" });
4923
+ const stop = () => {
4924
+ stopWatch();
4925
+ cleanup();
4926
+ };
4927
+ tryOnScopeDispose(stop);
4928
+ return stop;
4929
+ }
4930
+ function onClickOutside(target, handler, options = {}) {
4931
+ const { window: window2 = defaultWindow, ignore, capture = true } = options;
4932
+ if (!window2)
4933
+ return;
4934
+ const shouldListen = ref(true);
4935
+ const listener = (event) => {
4936
+ const el = unrefElement(target);
4937
+ const composedPath = event.composedPath();
4938
+ if (!el || el === event.target || composedPath.includes(el) || !shouldListen.value)
4939
+ return;
4940
+ if (ignore && ignore.length > 0) {
4941
+ if (ignore.some((target2) => {
4942
+ const el2 = unrefElement(target2);
4943
+ return el2 && (event.target === el2 || composedPath.includes(el2));
4944
+ }))
4945
+ return;
4946
+ }
4947
+ handler(event);
4948
+ };
4949
+ const cleanup = [
4950
+ useEventListener(window2, "click", listener, { passive: true, capture }),
4951
+ useEventListener(window2, "pointerdown", (e) => {
4952
+ const el = unrefElement(target);
4953
+ shouldListen.value = !!el && !e.composedPath().includes(el);
4954
+ }, { passive: true })
4955
+ ];
4956
+ const stop = () => cleanup.forEach((fn2) => fn2());
4957
+ return stop;
4958
+ }
4959
+ const _global = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
4960
+ const globalKey = "__vueuse_ssr_handlers__";
4961
+ _global[globalKey] = _global[globalKey] || {};
4962
+ _global[globalKey];
4963
+ var _a, _b;
4964
+ isClient && (window == null ? void 0 : window.navigator) && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.platform) && /iP(ad|hone|od)/.test((_b = window == null ? void 0 : window.navigator) == null ? void 0 : _b.platform);
4791
4965
  var select_vue_vue_type_style_index_0_lang = "";
4792
4966
  const _sfc_main$c = defineComponent({
4793
4967
  name: "DaoSelect",
4794
4968
  components: {
4795
4969
  DaoPopper: Popper
4796
4970
  },
4971
+ directives: {},
4797
4972
  props: {
4798
4973
  modelValue: {
4799
4974
  type: [String, Number, Boolean],
@@ -4830,7 +5005,7 @@ const _sfc_main$c = defineComponent({
4830
5005
  },
4831
5006
  appendTo: {
4832
5007
  type: [String, Boolean, Object],
4833
- default: "body"
5008
+ default: "root"
4834
5009
  }
4835
5010
  },
4836
5011
  emits: ["update:modelValue", "change", "search-change", "close", "open"],
@@ -4843,12 +5018,15 @@ const _sfc_main$c = defineComponent({
4843
5018
  search
4844
5019
  } = toRefs(props);
4845
5020
  const state = reactive({
5021
+ optionFocusIndex: -1,
5022
+ visible: false,
4846
5023
  selectedOption: void 0,
4847
5024
  options: [],
4848
5025
  searchText: ""
4849
5026
  });
4850
5027
  const popper2 = ref(null);
4851
5028
  const searchInput = ref(null);
5029
+ const triggerRef = ref(null);
4852
5030
  const instance = getCurrentInstance();
4853
5031
  provide("select", instance);
4854
5032
  const popperOffset = computed(() => {
@@ -4881,8 +5059,8 @@ const _sfc_main$c = defineComponent({
4881
5059
  return classNames.join(" ");
4882
5060
  });
4883
5061
  const isSelected = computed(() => {
4884
- var _a;
4885
- return !isNullish((_a = state.selectedOption) == null ? void 0 : _a.value);
5062
+ var _a2;
5063
+ return !isNullish((_a2 = state.selectedOption) == null ? void 0 : _a2.value);
4886
5064
  });
4887
5065
  const isNoResult = computed(() => {
4888
5066
  const unrefSearch = unref(search);
@@ -4904,31 +5082,40 @@ const _sfc_main$c = defineComponent({
4904
5082
  }
4905
5083
  ]
4906
5084
  }));
5085
+ const onSearchClear = () => {
5086
+ var _a2;
5087
+ state.searchText = "";
5088
+ state.options.forEach((option) => {
5089
+ option.setVisible(true);
5090
+ });
5091
+ (_a2 = searchInput.value) == null ? void 0 : _a2.focus();
5092
+ };
4907
5093
  const onSelect = (option) => {
4908
5094
  const unrefPopper = unref(popper2);
4909
5095
  state.selectedOption = option;
5096
+ onSearchClear();
4910
5097
  emit("update:modelValue", state.selectedOption.value);
4911
5098
  emit("change", state.selectedOption.value);
4912
5099
  unrefPopper == null ? void 0 : unrefPopper.hide();
4913
5100
  };
4914
5101
  const checkUpdatedOption = () => {
4915
- var _a;
5102
+ var _a2;
4916
5103
  const unrefModelValue = unref(modelValue);
4917
- if (!isNullish(unrefModelValue) && unrefModelValue !== ((_a = state.selectedOption) == null ? void 0 : _a.value)) {
5104
+ if (!isNullish(unrefModelValue) && unrefModelValue !== ((_a2 = state.selectedOption) == null ? void 0 : _a2.value)) {
4918
5105
  const target = state.options.find((o) => o.value === unrefModelValue);
4919
5106
  state.selectedOption = target;
4920
5107
  }
4921
5108
  };
4922
5109
  const checkNewOption = (option) => {
4923
- var _a;
5110
+ var _a2;
4924
5111
  const unrefModelValue = unref(modelValue);
4925
- if (!isNullish(unrefModelValue) && isNullish((_a = state.selectedOption) == null ? void 0 : _a.value) && unrefModelValue === option.value) {
5112
+ if (!isNullish(unrefModelValue) && isNullish((_a2 = state.selectedOption) == null ? void 0 : _a2.value) && unrefModelValue === option.value) {
4926
5113
  state.selectedOption = option;
4927
5114
  }
4928
5115
  };
4929
5116
  const checkRemovedOption = (option) => {
4930
- var _a;
4931
- if (((_a = state.selectedOption) == null ? void 0 : _a.value) === option.value) {
5117
+ var _a2;
5118
+ if (((_a2 = state.selectedOption) == null ? void 0 : _a2.value) === option.value) {
4932
5119
  state.selectedOption = void 0;
4933
5120
  }
4934
5121
  };
@@ -4948,14 +5135,6 @@ const _sfc_main$c = defineComponent({
4948
5135
  });
4949
5136
  emit("search-change", searchContent);
4950
5137
  };
4951
- const onSearchClear = () => {
4952
- var _a;
4953
- state.searchText = "";
4954
- state.options.forEach((option) => {
4955
- option.setVisible(true);
4956
- });
4957
- (_a = searchInput.value) == null ? void 0 : _a.focus();
4958
- };
4959
5138
  const remove = (index2) => {
4960
5139
  if (index2 > -1) {
4961
5140
  const [removed] = state.options.splice(index2, 1);
@@ -4973,8 +5152,106 @@ const _sfc_main$c = defineComponent({
4973
5152
  provide("remove", remove);
4974
5153
  provide("selectState", state);
4975
5154
  watch(modelValue, () => checkUpdatedOption());
5155
+ const bindTriggerEleOutsideClick = {
5156
+ cleanup: void 0,
5157
+ visible() {
5158
+ if (!this.cleanup) {
5159
+ this.cleanup = onClickOutside(popper2, () => {
5160
+ state.visible = false;
5161
+ }, {
5162
+ ignore: [triggerRef]
5163
+ });
5164
+ }
5165
+ },
5166
+ invisible() {
5167
+ if (typeof this.cleanup === "function") {
5168
+ this.cleanup();
5169
+ this.cleanup = void 0;
5170
+ }
5171
+ }
5172
+ };
5173
+ const bindPopperTrigger = {
5174
+ target: void 0,
5175
+ visible() {
5176
+ this.target = document.activeElement;
5177
+ },
5178
+ invisible() {
5179
+ var _a2;
5180
+ if (document.activeElement && document.activeElement !== this.target) {
5181
+ (_a2 = this.target) == null ? void 0 : _a2.focus();
5182
+ }
5183
+ this.target = void 0;
5184
+ }
5185
+ };
5186
+ watch(() => state.visible, (visible) => {
5187
+ if (visible) {
5188
+ bindTriggerEleOutsideClick.visible();
5189
+ bindPopperTrigger.visible();
5190
+ state.optionFocusIndex = (state == null ? void 0 : state.selectedOption) ? state == null ? void 0 : state.options.indexOf(state.selectedOption) : -1;
5191
+ setTimeout(() => {
5192
+ var _a2;
5193
+ (_a2 = searchInput.value) == null ? void 0 : _a2.focus();
5194
+ }, 0);
5195
+ } else {
5196
+ bindTriggerEleOutsideClick.invisible();
5197
+ bindPopperTrigger.invisible();
5198
+ state.optionFocusIndex = -1;
5199
+ }
5200
+ });
5201
+ const optionsAllDisabled = computed(() => state.options.filter((option) => option.visible).every((option) => option.disabled));
5202
+ const navigateOptions = (direction) => {
5203
+ if (!state.visible) {
5204
+ state.visible = true;
5205
+ return;
5206
+ }
5207
+ const { length } = state.options;
5208
+ if (length === 0) {
5209
+ return;
5210
+ }
5211
+ if (optionsAllDisabled.value) {
5212
+ return;
5213
+ }
5214
+ if (direction === "next") {
5215
+ state.optionFocusIndex += 1;
5216
+ if (state.optionFocusIndex === length) {
5217
+ state.optionFocusIndex = 0;
5218
+ }
5219
+ } else if (direction === "prev") {
5220
+ state.optionFocusIndex -= 1;
5221
+ if (state.optionFocusIndex < 0) {
5222
+ state.optionFocusIndex = length - 1;
5223
+ }
5224
+ }
5225
+ const option = state.options[state.optionFocusIndex];
5226
+ if (option.disabled || !option.visible) {
5227
+ navigateOptions(direction);
5228
+ }
5229
+ };
5230
+ const handleTargetTrigger = () => {
5231
+ if (state.optionFocusIndex > -1) {
5232
+ onSelect(state == null ? void 0 : state.options[state.optionFocusIndex]);
5233
+ return;
5234
+ }
5235
+ state.visible = !state.visible;
5236
+ };
5237
+ const handleEvent = {
5238
+ searchInput: {
5239
+ keydownEnter() {
5240
+ if (state.optionFocusIndex > -1) {
5241
+ handleTargetTrigger();
5242
+ } else if (state.searchText === "") {
5243
+ state.visible = false;
5244
+ }
5245
+ },
5246
+ keydownEsc() {
5247
+ state.searchText ? onSearchClear : state.visible = false;
5248
+ }
5249
+ }
5250
+ };
4976
5251
  return {
4977
5252
  popper: popper2,
5253
+ searchInput,
5254
+ triggerRef,
4978
5255
  state,
4979
5256
  selectClass,
4980
5257
  popperClass,
@@ -4987,31 +5264,22 @@ const _sfc_main$c = defineComponent({
4987
5264
  onSearchClear,
4988
5265
  add,
4989
5266
  remove,
4990
- searchInput
5267
+ handleTargetTrigger,
5268
+ navigateOptions,
5269
+ handleEvent
4991
5270
  };
4992
5271
  }
4993
5272
  });
4994
- const _hoisted_1$9 = {
4995
- class: "dao-selection",
4996
- tabindex: "1"
4997
- };
4998
- const _hoisted_2$7 = {
4999
- key: 0,
5000
- class: "dao-selection-text"
5001
- };
5002
- const _hoisted_3$4 = {
5003
- key: 1,
5004
- class: "dao-selection-text--placeholder"
5005
- };
5006
- const _hoisted_4$3 = /* @__PURE__ */ createElementVNode("i", { class: "icon-dropdown-line dao-selection-icon" }, null, -1);
5007
- const _hoisted_5$2 = {
5273
+ const _hoisted_1$8 = { class: "dao-selection-text" };
5274
+ const _hoisted_2$7 = /* @__PURE__ */ createElementVNode("i", { class: "icon-dropdown-line dao-selection-icon" }, null, -1);
5275
+ const _hoisted_3$3 = {
5008
5276
  key: 0,
5009
5277
  class: "dao-selection-search"
5010
5278
  };
5011
- const _hoisted_6$1 = ["placeholder"];
5012
- const _hoisted_7$1 = /* @__PURE__ */ createElementVNode("i", { class: "icon-search dao-selection-search-icon" }, null, -1);
5013
- const _hoisted_8$1 = { class: "dao-option-list" };
5014
- const _hoisted_9$1 = {
5279
+ const _hoisted_4$2 = ["placeholder"];
5280
+ const _hoisted_5$2 = /* @__PURE__ */ createElementVNode("i", { class: "icon-search dao-selection-search-icon" }, null, -1);
5281
+ const _hoisted_6$1 = { class: "dao-option-list" };
5282
+ const _hoisted_7$1 = {
5015
5283
  key: "dao-option-placeholder",
5016
5284
  class: "dao-option-placeholder"
5017
5285
  };
@@ -5019,6 +5287,8 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
5019
5287
  const _component_dao_popper = resolveComponent("dao-popper");
5020
5288
  return openBlock(), createBlock(_component_dao_popper, {
5021
5289
  ref: "popper",
5290
+ modelValue: _ctx.state.visible,
5291
+ "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => _ctx.state.visible = $event),
5022
5292
  delay: 0,
5023
5293
  disabled: _ctx.disabled,
5024
5294
  offset: _ctx.popperOffset,
@@ -5028,64 +5298,82 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
5028
5298
  class: normalizeClass(_ctx.selectClass),
5029
5299
  "append-to": _ctx.appendTo,
5030
5300
  transition: "dao-select",
5031
- trigger: "click",
5301
+ trigger: "manual",
5032
5302
  placement: "bottom",
5033
- onHide: _cache[5] || (_cache[5] = ($event) => _ctx.$emit("close")),
5034
- onShow: _cache[6] || (_cache[6] = ($event) => _ctx.$emit("open"))
5303
+ onHide: _cache[14] || (_cache[14] = ($event) => _ctx.$emit("close")),
5304
+ onShow: _cache[15] || (_cache[15] = ($event) => _ctx.$emit("open"))
5035
5305
  }, {
5036
5306
  content: withCtx(() => [
5037
5307
  renderSlot(_ctx.$slots, "optionsHeader", {}, () => [
5038
- _ctx.search ? (openBlock(), createElementBlock("div", _hoisted_5$2, [
5308
+ _ctx.search ? (openBlock(), createElementBlock("div", _hoisted_3$3, [
5039
5309
  withDirectives(createElementVNode("input", {
5040
5310
  ref: "searchInput",
5041
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.state.searchText = $event),
5311
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => _ctx.state.searchText = $event),
5042
5312
  placeholder: _ctx.searchPlaceholder,
5043
- tabindex: "1",
5044
5313
  class: "dao-selection-search-input",
5045
5314
  type: "search",
5046
- onKeydown: _cache[1] || (_cache[1] = withKeys((...args) => _ctx.onSearchClear && _ctx.onSearchClear(...args), ["esc"])),
5047
- onInput: _cache[2] || (_cache[2] = (...args) => _ctx.onSearchTextChange && _ctx.onSearchTextChange(...args))
5048
- }, null, 40, _hoisted_6$1), [
5315
+ onInput: _cache[6] || (_cache[6] = (...args) => _ctx.onSearchTextChange && _ctx.onSearchTextChange(...args)),
5316
+ onKeydown: [
5317
+ _cache[7] || (_cache[7] = withKeys(withModifiers(($event) => _ctx.state.visible = false, ["stop", "prevent"]), ["tab"])),
5318
+ _cache[8] || (_cache[8] = withKeys((...args) => _ctx.handleEvent.searchInput.keydownEsc && _ctx.handleEvent.searchInput.keydownEsc(...args), ["esc"])),
5319
+ _cache[9] || (_cache[9] = withKeys(withModifiers((...args) => _ctx.handleEvent.searchInput.keydownEnter && _ctx.handleEvent.searchInput.keydownEnter(...args), ["stop", "prevent"]), ["enter"])),
5320
+ _cache[10] || (_cache[10] = withKeys(withModifiers(($event) => _ctx.navigateOptions("next"), ["prevent"]), ["down"])),
5321
+ _cache[11] || (_cache[11] = withKeys(withModifiers(($event) => _ctx.navigateOptions("prev"), ["prevent"]), ["up"]))
5322
+ ]
5323
+ }, null, 40, _hoisted_4$2), [
5049
5324
  [vModelText, _ctx.state.searchText]
5050
5325
  ]),
5051
- _hoisted_7$1,
5326
+ _hoisted_5$2,
5052
5327
  withDirectives(createElementVNode("i", {
5053
5328
  class: "icon-sys-error dao-selection-search-clear-icon",
5054
- tabindex: "1",
5055
- onKeydown: _cache[3] || (_cache[3] = withKeys((...args) => _ctx.onSearchClear && _ctx.onSearchClear(...args), ["enter"])),
5056
- onClick: _cache[4] || (_cache[4] = (...args) => _ctx.onSearchClear && _ctx.onSearchClear(...args))
5057
- }, null, 544), [
5329
+ onClick: _cache[12] || (_cache[12] = withModifiers((...args) => _ctx.onSearchClear && _ctx.onSearchClear(...args), ["stop", "prevent"]))
5330
+ }, null, 512), [
5058
5331
  [vShow, _ctx.state.searchText]
5059
5332
  ])
5060
5333
  ])) : createCommentVNode("", true)
5061
5334
  ]),
5062
- createElementVNode("ul", _hoisted_8$1, [
5335
+ createElementVNode("ul", _hoisted_6$1, [
5063
5336
  renderSlot(_ctx.$slots, "default"),
5064
- _ctx.isNoResult ? (openBlock(), createElementBlock("li", _hoisted_9$1, toDisplayString(_ctx.optionsPlaceholder), 1)) : createCommentVNode("", true)
5337
+ _ctx.isNoResult ? (openBlock(), createElementBlock("li", _hoisted_7$1, toDisplayString(_ctx.optionsPlaceholder), 1)) : createCommentVNode("", true)
5065
5338
  ])
5066
5339
  ]),
5067
5340
  default: withCtx(() => {
5068
- var _a, _b;
5341
+ var _a2, _b2;
5069
5342
  return [
5070
- createElementVNode("button", _hoisted_1$9, [
5071
- _ctx.isSelected ? (openBlock(), createElementBlock("span", _hoisted_2$7, [
5343
+ createElementVNode("button", {
5344
+ ref: "triggerRef",
5345
+ class: "dao-selection",
5346
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleTargetTrigger && _ctx.handleTargetTrigger(...args)),
5347
+ onKeydown: [
5348
+ _cache[1] || (_cache[1] = withKeys(withModifiers(($event) => _ctx.state.visible = false, ["stop"]), ["tab"])),
5349
+ _cache[2] || (_cache[2] = withKeys(withModifiers(($event) => _ctx.state.visible = false, ["stop", "prevent"]), ["esc"])),
5350
+ _cache[3] || (_cache[3] = withKeys(withModifiers(($event) => _ctx.navigateOptions("next"), ["prevent"]), ["down"])),
5351
+ _cache[4] || (_cache[4] = withKeys(withModifiers(($event) => _ctx.navigateOptions("prev"), ["prevent"]), ["up"]))
5352
+ ]
5353
+ }, [
5354
+ withDirectives(createElementVNode("span", _hoisted_1$8, [
5072
5355
  renderSlot(_ctx.$slots, "selected", {
5073
- selectedLabel: (_a = _ctx.state.selectedOption) == null ? void 0 : _a.label,
5356
+ selectedLabel: (_a2 = _ctx.state.selectedOption) == null ? void 0 : _a2.label,
5074
5357
  selectedOption: _ctx.state.selectedOption,
5075
- selectedValue: (_b = _ctx.state.selectedOption) == null ? void 0 : _b.value
5358
+ selectedValue: (_b2 = _ctx.state.selectedOption) == null ? void 0 : _b2.value
5076
5359
  }, () => {
5077
- var _a2;
5360
+ var _a3;
5078
5361
  return [
5079
- createTextVNode(toDisplayString((_a2 = _ctx.state.selectedOption) == null ? void 0 : _a2.labelValue), 1)
5362
+ createTextVNode(toDisplayString((_a3 = _ctx.state.selectedOption) == null ? void 0 : _a3.labelValue), 1)
5080
5363
  ];
5081
5364
  })
5082
- ])) : (openBlock(), createElementBlock("span", _hoisted_3$4, toDisplayString(_ctx.placeholder), 1)),
5083
- _hoisted_4$3
5084
- ])
5365
+ ], 512), [
5366
+ [vShow, _ctx.isSelected]
5367
+ ]),
5368
+ withDirectives(createElementVNode("span", { class: "dao-selection-text--placeholder" }, toDisplayString(_ctx.placeholder), 513), [
5369
+ [vShow, !_ctx.isSelected]
5370
+ ]),
5371
+ _hoisted_2$7
5372
+ ], 544)
5085
5373
  ];
5086
5374
  }),
5087
5375
  _: 3
5088
- }, 8, ["disabled", "offset", "popper-class", "popper-options", "class", "append-to"]);
5376
+ }, 8, ["modelValue", "disabled", "offset", "popper-class", "popper-options", "class", "append-to"]);
5089
5377
  }
5090
5378
  var DaoSelect = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$a]]);
5091
5379
  var option_vue_vue_type_style_index_0_lang = "";
@@ -5106,10 +5394,12 @@ const _sfc_main$b = defineComponent({
5106
5394
  }
5107
5395
  },
5108
5396
  setup(props) {
5397
+ const optionRef = ref(null);
5109
5398
  const addFn = inject("add");
5110
5399
  const onSelectFn = inject("onSelect");
5111
5400
  const removeFn = inject("remove");
5112
5401
  const selectState = inject("selectState");
5402
+ const { label, disabled, value } = toRefs(props);
5113
5403
  const labelValue = computed(() => {
5114
5404
  if (props.label === null || props.label === void 0) {
5115
5405
  return props.value;
@@ -5117,9 +5407,10 @@ const _sfc_main$b = defineComponent({
5117
5407
  return props.label;
5118
5408
  });
5119
5409
  const instance = reactive({
5120
- label: props.label,
5121
- value: props.value,
5122
- labelValue: labelValue.value,
5410
+ label,
5411
+ value,
5412
+ disabled,
5413
+ labelValue,
5123
5414
  visible: true,
5124
5415
  setVisible(val) {
5125
5416
  instance.visible = val;
@@ -5127,8 +5418,21 @@ const _sfc_main$b = defineComponent({
5127
5418
  });
5128
5419
  const visible = computed(() => instance.visible);
5129
5420
  const isSelected = computed(() => {
5130
- var _a;
5131
- return ((_a = selectState == null ? void 0 : selectState.selectedOption) == null ? void 0 : _a.value) === instance.value;
5421
+ var _a2;
5422
+ return ((_a2 = selectState == null ? void 0 : selectState.selectedOption) == null ? void 0 : _a2.value) === instance.value;
5423
+ });
5424
+ const isFocus = computed(() => {
5425
+ var _a2, _b2;
5426
+ const index2 = (_b2 = (_a2 = selectState == null ? void 0 : selectState.options) == null ? void 0 : _a2.indexOf(instance)) != null ? _b2 : -1;
5427
+ return index2 === (selectState == null ? void 0 : selectState.optionFocusIndex);
5428
+ });
5429
+ watch(isFocus, (val) => {
5430
+ nextTick(() => {
5431
+ if (val) {
5432
+ const el = optionRef.value;
5433
+ (el == null ? void 0 : el.scrollIntoViewIfNeeded) && (el == null ? void 0 : el.scrollIntoViewIfNeeded(false)) || (el == null ? void 0 : el.scrollIntoView) && el.scrollIntoView(false);
5434
+ }
5435
+ });
5132
5436
  });
5133
5437
  const onClick = () => {
5134
5438
  if (!props.disabled && typeof onSelectFn === "function") {
@@ -5139,31 +5443,35 @@ const _sfc_main$b = defineComponent({
5139
5443
  addFn(instance);
5140
5444
  }
5141
5445
  onBeforeUnmount(() => {
5142
- var _a;
5446
+ var _a2;
5143
5447
  if (typeof removeFn === "function") {
5144
- const index2 = (_a = selectState == null ? void 0 : selectState.options.indexOf(instance)) != null ? _a : -1;
5448
+ const index2 = (_a2 = selectState == null ? void 0 : selectState.options.indexOf(instance)) != null ? _a2 : -1;
5145
5449
  removeFn(index2);
5146
5450
  }
5147
5451
  });
5148
5452
  return {
5453
+ optionRef,
5149
5454
  visible,
5150
5455
  labelValue,
5151
5456
  isSelected,
5457
+ isFocus,
5152
5458
  onClick
5153
5459
  };
5154
5460
  }
5155
5461
  });
5156
- const _hoisted_1$8 = ["title"];
5462
+ const _hoisted_1$7 = ["title"];
5157
5463
  const _hoisted_2$6 = {
5158
5464
  key: 0,
5159
5465
  class: "icon-checked dao-option-checkmark"
5160
5466
  };
5161
5467
  function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
5162
5468
  return withDirectives((openBlock(), createElementBlock("li", {
5469
+ ref: "optionRef",
5163
5470
  class: normalizeClass([
5164
5471
  "dao-option",
5165
5472
  {
5166
5473
  "dao-option-active": _ctx.isSelected,
5474
+ "dao-option--focus": _ctx.isFocus,
5167
5475
  "dao-option-disabled": _ctx.disabled
5168
5476
  }
5169
5477
  ]),
@@ -5175,7 +5483,7 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
5175
5483
  renderSlot(_ctx.$slots, "default", {}, () => [
5176
5484
  createTextVNode(toDisplayString(_ctx.labelValue), 1)
5177
5485
  ])
5178
- ], 8, _hoisted_1$8),
5486
+ ], 8, _hoisted_1$7),
5179
5487
  _ctx.isSelected ? (openBlock(), createElementBlock("i", _hoisted_2$6)) : createCommentVNode("", true)
5180
5488
  ], 2)), [
5181
5489
  [vShow, _ctx.visible]
@@ -5217,6 +5525,16 @@ const _sfc_main$a = defineComponent({
5217
5525
  }
5218
5526
  return [...filteredPageSizeOptions, props.pageSize].sort(numberAscSort);
5219
5527
  });
5528
+ const computedLayout = computed(() => {
5529
+ if (!props.layout || props.layout.length === 0) {
5530
+ return { show: false };
5531
+ }
5532
+ const res = { show: true };
5533
+ props.layout.forEach((key) => {
5534
+ res[key] = true;
5535
+ });
5536
+ return res;
5537
+ });
5220
5538
  const prevPage = () => {
5221
5539
  if (currentPage.value === 1) {
5222
5540
  return;
@@ -5246,13 +5564,11 @@ const _sfc_main$a = defineComponent({
5246
5564
  emit("update:current-page", value);
5247
5565
  emit("page-change", value);
5248
5566
  };
5249
- watch(currentPage, (val) => {
5250
- currentShowPage.value = val;
5251
- });
5252
- watch(totalPage, (val) => {
5253
- if (currentShowPage.value > val) {
5254
- currentShowPage.value = val;
5255
- emit("update:current-page", val);
5567
+ watch([currentPage, totalPage], () => {
5568
+ currentShowPage.value = props.currentPage;
5569
+ if (currentShowPage.value > totalPage.value) {
5570
+ currentShowPage.value = totalPage.value;
5571
+ emit("update:current-page", totalPage.value);
5256
5572
  }
5257
5573
  });
5258
5574
  const updatePageSize = (val) => {
@@ -5271,6 +5587,7 @@ const _sfc_main$a = defineComponent({
5271
5587
  totalText,
5272
5588
  totalPage,
5273
5589
  computedPageSizeOptions,
5590
+ computedLayout,
5274
5591
  prevPage,
5275
5592
  nextPage,
5276
5593
  targetPage,
@@ -5279,47 +5596,50 @@ const _sfc_main$a = defineComponent({
5279
5596
  };
5280
5597
  }
5281
5598
  });
5282
- const _hoisted_1$7 = { class: "dao-pagination__total" };
5283
- const _hoisted_2$5 = { class: "dao-pagination__pager" };
5284
- const _hoisted_3$3 = ["disabled"];
5285
- const _hoisted_4$2 = { class: "dao-pagination__pager-total" };
5599
+ const _hoisted_1$6 = ["disabled"];
5600
+ const _hoisted_2$5 = { class: "dao-pagination__pager-total" };
5286
5601
  function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
5287
5602
  const _component_dao_option = resolveComponent("dao-option");
5288
5603
  const _component_dao_select = resolveComponent("dao-select");
5289
- return openBlock(), createElementBlock("div", {
5604
+ return _ctx.computedLayout.show ? (openBlock(), createElementBlock("div", {
5605
+ key: 0,
5290
5606
  class: normalizeClass(["dao-pagination", { "dao-pagination--compact": _ctx.compact }])
5291
5607
  }, [
5292
- createElementVNode("div", _hoisted_1$7, toDisplayString(_ctx.totalText), 1),
5293
- createElementVNode("div", _hoisted_2$5, [
5608
+ createElementVNode("div", {
5609
+ class: normalizeClass(["dao-pagination__total", { "is-invisible": !_ctx.computedLayout.total }])
5610
+ }, toDisplayString(_ctx.totalText), 3),
5611
+ createElementVNode("div", {
5612
+ class: normalizeClass(["dao-pagination__pager", { "is-invisible": !_ctx.computedLayout.pager }])
5613
+ }, [
5294
5614
  createElementVNode("i", {
5295
5615
  class: normalizeClass([
5296
5616
  "icon-arrow-previous",
5297
5617
  "dao-pagination__pager-prev",
5298
- { "dao-pagination__pager-icon--disabled": _ctx.currentPage === 1 }
5618
+ { "dao-pagination__pager-icon--disabled": _ctx.currentPage <= 1 }
5299
5619
  ]),
5300
5620
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.prevPage && _ctx.prevPage(...args))
5301
5621
  }, null, 2),
5302
5622
  withDirectives(createElementVNode("input", {
5303
5623
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.currentShowPage = $event),
5304
5624
  class: "dao-pagination__pager-current",
5305
- disabled: _ctx.totalPage === 1,
5625
+ disabled: _ctx.totalPage <= 1,
5306
5626
  onKeydown: _cache[2] || (_cache[2] = withKeys((...args) => _ctx.targetPage && _ctx.targetPage(...args), ["enter"])),
5307
5627
  onInput: _cache[3] || (_cache[3] = (...args) => _ctx.currentShowPageFormat && _ctx.currentShowPageFormat(...args))
5308
- }, null, 40, _hoisted_3$3), [
5628
+ }, null, 40, _hoisted_1$6), [
5309
5629
  [vModelText, _ctx.currentShowPage]
5310
5630
  ]),
5311
- createElementVNode("span", _hoisted_4$2, " / " + toDisplayString(_ctx.totalPage), 1),
5631
+ createElementVNode("span", _hoisted_2$5, " / " + toDisplayString(_ctx.totalPage), 1),
5312
5632
  createElementVNode("i", {
5313
5633
  class: normalizeClass([
5314
5634
  "icon-arrow-next",
5315
5635
  "dao-pagination__pager-next",
5316
- { "dao-pagination__pager-icon--disabled": _ctx.currentPage === _ctx.totalPage }
5636
+ { "dao-pagination__pager-icon--disabled": _ctx.currentPage >= _ctx.totalPage }
5317
5637
  ]),
5318
5638
  onClick: _cache[4] || (_cache[4] = (...args) => _ctx.nextPage && _ctx.nextPage(...args))
5319
5639
  }, null, 2)
5320
- ]),
5640
+ ], 2),
5321
5641
  createVNode(_component_dao_select, {
5322
- class: "dao-pagination__sizer",
5642
+ class: normalizeClass(["dao-pagination__sizer", { "is-invisible": !_ctx.computedLayout.sizer }]),
5323
5643
  "model-value": _ctx.pageSize,
5324
5644
  size: "sm",
5325
5645
  style: normalizeStyle({ width: `${_ctx.pageSizerWidth}px` }),
@@ -5336,8 +5656,8 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
5336
5656
  }), 128))
5337
5657
  ]),
5338
5658
  _: 1
5339
- }, 8, ["model-value", "style", "onChange"])
5340
- ], 2);
5659
+ }, 8, ["class", "model-value", "style", "onChange"])
5660
+ ], 2)) : createCommentVNode("", true);
5341
5661
  }
5342
5662
  var DaoPagination = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$8]]);
5343
5663
  var popover_scss_vue_type_style_index_0_src_lang = "";
@@ -5396,7 +5716,7 @@ const _sfc_main$8 = defineComponent({
5396
5716
  };
5397
5717
  }
5398
5718
  });
5399
- const _hoisted_1$6 = { class: "dao-progress" };
5719
+ const _hoisted_1$5 = { class: "dao-progress" };
5400
5720
  const _hoisted_2$4 = {
5401
5721
  key: 1,
5402
5722
  class: "dao-progress__stacked"
@@ -5406,7 +5726,7 @@ const _hoisted_3$2 = {
5406
5726
  class: "dao-progress__text"
5407
5727
  };
5408
5728
  function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
5409
- return openBlock(), createElementBlock("div", _hoisted_1$6, [
5729
+ return openBlock(), createElementBlock("div", _hoisted_1$5, [
5410
5730
  createElementVNode("div", {
5411
5731
  class: "dao-progress__inner",
5412
5732
  style: normalizeStyle({ background: _ctx.bgColor })
@@ -5502,7 +5822,7 @@ const _sfc_main$7 = defineComponent({
5502
5822
  };
5503
5823
  }
5504
5824
  });
5505
- const _hoisted_1$5 = ["disabled", "name", "checked"];
5825
+ const _hoisted_1$4 = ["disabled", "name", "checked"];
5506
5826
  const _hoisted_2$3 = /* @__PURE__ */ createElementVNode("span", { class: "dao-radio-inner" }, null, -1);
5507
5827
  const _hoisted_3$1 = {
5508
5828
  key: 0,
@@ -5530,7 +5850,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
5530
5850
  name: _ctx.name,
5531
5851
  checked: _ctx.currentValue,
5532
5852
  onChange: _cache[0] || (_cache[0] = (...args) => _ctx.change && _ctx.change(...args))
5533
- }, null, 40, _hoisted_1$5),
5853
+ }, null, 40, _hoisted_1$4),
5534
5854
  _hoisted_2$3
5535
5855
  ], 2),
5536
5856
  _ctx.$slots.default || _ctx.label || _ctx.$slots.helper ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
@@ -5645,7 +5965,7 @@ const _sfc_main$5 = defineComponent({
5645
5965
  };
5646
5966
  }
5647
5967
  });
5648
- const _hoisted_1$4 = ["value", "name", "disabled"];
5968
+ const _hoisted_1$3 = ["value", "name", "disabled"];
5649
5969
  const _hoisted_2$2 = {
5650
5970
  key: 0,
5651
5971
  class: "dao-switch__label"
@@ -5661,7 +5981,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
5661
5981
  value: _ctx.currentValue,
5662
5982
  name: _ctx.name,
5663
5983
  disabled: _ctx.disabled
5664
- }, null, 8, _hoisted_1$4),
5984
+ }, null, 8, _hoisted_1$3),
5665
5985
  createElementVNode("span", {
5666
5986
  class: normalizeClass(["dao-switch__pill", { "dao-switch-checked": _ctx.currentValue }])
5667
5987
  }, null, 2),
@@ -5717,9 +6037,9 @@ const _sfc_main$4 = defineComponent({
5717
6037
  };
5718
6038
  }
5719
6039
  });
5720
- const _hoisted_1$3 = { class: "dao-table-resizer-separator" };
6040
+ const _hoisted_1$2 = { class: "dao-table-resizer-separator" };
5721
6041
  function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
5722
- return openBlock(), createElementBlock("span", _hoisted_1$3, [
6042
+ return openBlock(), createElementBlock("span", _hoisted_1$2, [
5723
6043
  !_ctx.disabled ? (openBlock(), createElementBlock("span", {
5724
6044
  key: 0,
5725
6045
  class: "dao-table-resizer-handle",
@@ -5791,7 +6111,16 @@ const tableProps = {
5791
6111
  pageSizerWidth: {
5792
6112
  type: Number,
5793
6113
  default: 110
5794
- }
6114
+ },
6115
+ emptyText: {
6116
+ type: String,
6117
+ default: "\u6682\u65E0\u6570\u636E"
6118
+ },
6119
+ noShadow: {
6120
+ type: Boolean,
6121
+ default: false
6122
+ },
6123
+ pageLayout: paginationProps.layout
5795
6124
  };
5796
6125
  var table_vue_vue_type_style_index_0_lang = "";
5797
6126
  const positiveIntegerNumberReg = /^[1-9]\d*$/;
@@ -5834,10 +6163,24 @@ const _sfc_main$3 = defineComponent({
5834
6163
  const expandedRows = reactive(new WeakSet());
5835
6164
  const columnRefs = reactive({});
5836
6165
  const columns = reactive([]);
5837
- const currentPage = toRef(props, "currentPage");
5838
- const pageSize = toRef(props, "pageSize");
6166
+ const currentPage = computed({
6167
+ get() {
6168
+ return props.currentPage;
6169
+ },
6170
+ set(value) {
6171
+ emit("update:current-page", value);
6172
+ }
6173
+ });
6174
+ const pageSize = computed({
6175
+ get() {
6176
+ return props.pageSize;
6177
+ },
6178
+ set(value) {
6179
+ emit("update:page-size", value);
6180
+ }
6181
+ });
5839
6182
  const tableScroll = ref();
5840
- const global = reactive({
6183
+ const global2 = reactive({
5841
6184
  checked: false,
5842
6185
  indeterminate: false
5843
6186
  });
@@ -5863,8 +6206,8 @@ const _sfc_main$3 = defineComponent({
5863
6206
  watch(tableSetting, (val) => {
5864
6207
  setTableSetting(val);
5865
6208
  });
5866
- function formatDefaultTableSetting() {
5867
- return columns.reduce((prev, current) => {
6209
+ function formatDefaultTableSetting(tempColumns) {
6210
+ return tempColumns.reduce((prev, current) => {
5868
6211
  const preValue = prev;
5869
6212
  preValue[current.id] = {
5870
6213
  width: current.defaultWidth,
@@ -5874,16 +6217,16 @@ const _sfc_main$3 = defineComponent({
5874
6217
  }, {});
5875
6218
  }
5876
6219
  const init = () => {
5877
- columns.length = 0;
6220
+ const tempColumns = [];
5878
6221
  props.columns.forEach((column) => {
5879
- columns.push(__spreadValues(__spreadValues({}, defaultColumnConfig), column));
6222
+ tempColumns.push(__spreadValues(__spreadValues({}, defaultColumnConfig), column));
5880
6223
  });
5881
6224
  const storedTableSetting = getTableSetting();
5882
- const defaultTableSetting = formatDefaultTableSetting();
6225
+ const defaultTableSetting = formatDefaultTableSetting(tempColumns);
5883
6226
  if (!storedTableSetting) {
5884
6227
  Object.assign(tableSetting, defaultTableSetting);
5885
6228
  } else {
5886
- columns.forEach((column) => {
6229
+ tempColumns.forEach((column) => {
5887
6230
  const { id } = column;
5888
6231
  if (!storedTableSetting[id]) {
5889
6232
  tableSetting[id] = {
@@ -5900,6 +6243,7 @@ const _sfc_main$3 = defineComponent({
5900
6243
  }
5901
6244
  });
5902
6245
  }
6246
+ columns.splice(0, columns.length, ...tempColumns);
5903
6247
  };
5904
6248
  const columnStyle = (id) => {
5905
6249
  const setting = tableSetting[id];
@@ -5923,6 +6267,7 @@ const _sfc_main$3 = defineComponent({
5923
6267
  }
5924
6268
  return classes;
5925
6269
  });
6270
+ const isEmpty = computed(() => (props.data || []).length === 0);
5926
6271
  const sortColumn = (column) => {
5927
6272
  if (!column.sortable) {
5928
6273
  return;
@@ -5964,7 +6309,7 @@ const _sfc_main$3 = defineComponent({
5964
6309
  }
5965
6310
  };
5966
6311
  const toggleSelectedAll = () => {
5967
- if (global.checked) {
6312
+ if (global2.checked) {
5968
6313
  selectedRows.clear();
5969
6314
  emit("select", []);
5970
6315
  } else {
@@ -5992,16 +6337,9 @@ const _sfc_main$3 = defineComponent({
5992
6337
  clearExpansion();
5993
6338
  clearSelection();
5994
6339
  };
5995
- init();
5996
6340
  watch(() => props.columns, () => {
5997
6341
  init();
5998
- }, { deep: true });
5999
- watch(currentPage, (val) => {
6000
- emit("update:current-page", val);
6001
- });
6002
- watch(pageSize, (val) => {
6003
- emit("update:page-size", val);
6004
- });
6342
+ }, { deep: true, immediate: true });
6005
6343
  watchEffect(() => {
6006
6344
  let have = 0;
6007
6345
  let notHave = 0;
@@ -6017,14 +6355,14 @@ const _sfc_main$3 = defineComponent({
6017
6355
  }
6018
6356
  }
6019
6357
  if (have && notHave) {
6020
- global.checked = false;
6021
- global.indeterminate = true;
6358
+ global2.checked = false;
6359
+ global2.indeterminate = true;
6022
6360
  } else if (have) {
6023
- global.checked = true;
6024
- global.indeterminate = false;
6361
+ global2.checked = true;
6362
+ global2.indeterminate = false;
6025
6363
  } else {
6026
- global.checked = false;
6027
- global.indeterminate = false;
6364
+ global2.checked = false;
6365
+ global2.indeterminate = false;
6028
6366
  }
6029
6367
  });
6030
6368
  const isEllipsis = () => {
@@ -6073,66 +6411,72 @@ const _sfc_main$3 = defineComponent({
6073
6411
  currentPage,
6074
6412
  pageSize,
6075
6413
  clearState,
6076
- global,
6414
+ global: global2,
6077
6415
  tableScroll,
6078
6416
  expandedRows,
6079
- onRowClick
6417
+ onRowClick,
6418
+ isEmpty
6080
6419
  };
6081
6420
  }
6082
6421
  });
6083
- const _hoisted_1$2 = { class: "dao-table-container" };
6084
- const _hoisted_2$1 = { class: "dao-table" };
6085
- const _hoisted_3 = {
6422
+ const _hoisted_1$1 = { class: "dao-table" };
6423
+ const _hoisted_2$1 = {
6086
6424
  key: 0,
6087
6425
  class: "dao-table-thead"
6088
6426
  };
6089
- const _hoisted_4 = { class: "dao-table-tr" };
6090
- const _hoisted_5 = {
6427
+ const _hoisted_3 = { class: "dao-table-tr" };
6428
+ const _hoisted_4 = {
6091
6429
  key: 0,
6092
6430
  class: "dao-table-th"
6093
6431
  };
6094
- const _hoisted_6 = {
6432
+ const _hoisted_5 = {
6095
6433
  key: 1,
6096
6434
  class: "dao-table-th dao-table-th--expandable"
6097
6435
  };
6098
- const _hoisted_7 = ["onClick"];
6099
- const _hoisted_8 = { class: "dao-table-th__content" };
6100
- const _hoisted_9 = { class: "dao-table-tbody" };
6101
- const _hoisted_10 = ["onClick"];
6102
- const _hoisted_11 = {
6436
+ const _hoisted_6 = ["onClick"];
6437
+ const _hoisted_7 = { class: "dao-table-th__content" };
6438
+ const _hoisted_8 = { class: "dao-table-tbody" };
6439
+ const _hoisted_9 = ["onClick"];
6440
+ const _hoisted_10 = {
6103
6441
  key: 0,
6104
6442
  class: "dao-table-td"
6105
6443
  };
6106
- const _hoisted_12 = {
6444
+ const _hoisted_11 = {
6107
6445
  key: 1,
6108
6446
  class: "dao-table-td"
6109
6447
  };
6110
- const _hoisted_13 = ["onClick"];
6111
- const _hoisted_14 = {
6448
+ const _hoisted_12 = ["onClick"];
6449
+ const _hoisted_13 = {
6112
6450
  key: 0,
6113
6451
  class: "dao-table-tr-expand"
6114
6452
  };
6453
+ const _hoisted_14 = {
6454
+ key: 0,
6455
+ class: "dao-table__empty-block"
6456
+ };
6115
6457
  const _hoisted_15 = { class: "dao-table-pagination" };
6116
6458
  function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
6117
6459
  const _component_dao_checkbox = resolveComponent("dao-checkbox");
6118
6460
  const _component_dao_resizer = resolveComponent("dao-resizer");
6119
6461
  const _component_dao_pagination = resolveComponent("dao-pagination");
6120
- return openBlock(), createElementBlock("div", _hoisted_1$2, [
6462
+ return openBlock(), createElementBlock("div", {
6463
+ class: normalizeClass(["dao-table-container", { "dao-table-container--with-shadow": !_ctx.noShadow }])
6464
+ }, [
6121
6465
  createElementVNode("div", {
6122
6466
  ref: "tableScroll",
6123
6467
  class: normalizeClass(["dao-table-scroll", _ctx.tableWrapperClasses])
6124
6468
  }, [
6125
- createElementVNode("table", _hoisted_2$1, [
6126
- _ctx.showHeader ? (openBlock(), createElementBlock("thead", _hoisted_3, [
6127
- createElementVNode("tr", _hoisted_4, [
6128
- _ctx.selectable ? (openBlock(), createElementBlock("th", _hoisted_5, [
6469
+ createElementVNode("table", _hoisted_1$1, [
6470
+ _ctx.showHeader ? (openBlock(), createElementBlock("thead", _hoisted_2$1, [
6471
+ createElementVNode("tr", _hoisted_3, [
6472
+ _ctx.selectable ? (openBlock(), createElementBlock("th", _hoisted_4, [
6129
6473
  createVNode(_component_dao_checkbox, {
6130
6474
  checked: _ctx.global.checked,
6131
6475
  indeterminate: _ctx.global.indeterminate,
6132
6476
  onChange: _ctx.toggleSelectedAll
6133
6477
  }, null, 8, ["checked", "indeterminate", "onChange"])
6134
6478
  ])) : createCommentVNode("", true),
6135
- _ctx.expandable ? (openBlock(), createElementBlock("th", _hoisted_6)) : createCommentVNode("", true),
6479
+ _ctx.expandable ? (openBlock(), createElementBlock("th", _hoisted_5)) : createCommentVNode("", true),
6136
6480
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.filterColumns, (column) => {
6137
6481
  return openBlock(), createElementBlock("th", {
6138
6482
  key: column.id,
@@ -6141,7 +6485,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
6141
6485
  style: normalizeStyle(_ctx.columnStyle(column.id)),
6142
6486
  onClick: ($event) => _ctx.sortColumn(column)
6143
6487
  }, [
6144
- createElementVNode("span", _hoisted_8, [
6488
+ createElementVNode("span", _hoisted_7, [
6145
6489
  renderSlot(_ctx.$slots, `th-${column.id}`, {}, () => [
6146
6490
  createTextVNode(toDisplayString(column.header), 1)
6147
6491
  ])
@@ -6160,28 +6504,28 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
6160
6504
  onUpdateColumnWidth: ($event) => _ctx.updateColumnWidth($event, column.id),
6161
6505
  onAfterResize: ($event) => _ctx.$emit("afterResize", column.id)
6162
6506
  }, null, 8, ["disabled", "setting", "column", "onFixedColumnWidth", "onUpdateColumnWidth", "onAfterResize"])
6163
- ], 14, _hoisted_7);
6507
+ ], 14, _hoisted_6);
6164
6508
  }), 128))
6165
6509
  ])
6166
6510
  ])) : createCommentVNode("", true),
6167
- createElementVNode("tbody", _hoisted_9, [
6511
+ createElementVNode("tbody", _hoisted_8, [
6168
6512
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.data, (row, index2) => {
6169
6513
  return openBlock(), createElementBlock(Fragment, { key: index2 }, [
6170
6514
  createElementVNode("tr", {
6171
6515
  class: normalizeClass(["dao-table-tr", { "dao-table-tr--expandable-open": _ctx.expandable && _ctx.isRowExpanded(row) }]),
6172
6516
  onClick: ($event) => _ctx.onRowClick(row, index2)
6173
6517
  }, [
6174
- _ctx.selectable ? (openBlock(), createElementBlock("td", _hoisted_11, [
6518
+ _ctx.selectable ? (openBlock(), createElementBlock("td", _hoisted_10, [
6175
6519
  createVNode(_component_dao_checkbox, {
6176
6520
  checked: _ctx.isRowSelected(row),
6177
6521
  onChange: ($event) => _ctx.toggleSelected(row)
6178
6522
  }, null, 8, ["checked", "onChange"])
6179
6523
  ])) : createCommentVNode("", true),
6180
- _ctx.expandable ? (openBlock(), createElementBlock("td", _hoisted_12, [
6524
+ _ctx.expandable ? (openBlock(), createElementBlock("td", _hoisted_11, [
6181
6525
  createElementVNode("i", {
6182
6526
  class: "dao-table-expand-toggle icon-arrow-sharp",
6183
6527
  onClick: ($event) => _ctx.toggleExpand(row, index2)
6184
- }, null, 8, _hoisted_13)
6528
+ }, null, 8, _hoisted_12)
6185
6529
  ])) : createCommentVNode("", true),
6186
6530
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.filterColumns, (column) => {
6187
6531
  return openBlock(), createElementBlock("td", {
@@ -6198,8 +6542,8 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
6198
6542
  ])
6199
6543
  ], 4);
6200
6544
  }), 128))
6201
- ], 10, _hoisted_10),
6202
- _ctx.expandable && _ctx.expandedRows.has(row) ? withDirectives((openBlock(), createElementBlock("tr", _hoisted_14, [
6545
+ ], 10, _hoisted_9),
6546
+ _ctx.expandable && _ctx.expandedRows.has(row) ? withDirectives((openBlock(), createElementBlock("tr", _hoisted_13, [
6203
6547
  renderSlot(_ctx.$slots, "expand", {
6204
6548
  row,
6205
6549
  rowIndex: index2
@@ -6208,43 +6552,53 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
6208
6552
  [vShow, _ctx.isRowExpanded(row)]
6209
6553
  ]) : createCommentVNode("", true)
6210
6554
  ], 64);
6211
- }), 128))
6555
+ }), 128)),
6556
+ _ctx.isEmpty ? (openBlock(), createElementBlock("div", _hoisted_14, [
6557
+ renderSlot(_ctx.$slots, "empty", {}, () => [
6558
+ createTextVNode(toDisplayString(_ctx.emptyText), 1)
6559
+ ])
6560
+ ])) : createCommentVNode("", true)
6212
6561
  ])
6213
6562
  ])
6214
6563
  ], 2),
6215
6564
  createElementVNode("div", _hoisted_15, [
6216
- renderSlot(_ctx.$slots, "pagination", {}, () => [
6217
- createVNode(_component_dao_pagination, {
6218
- "current-page": _ctx.currentPage,
6219
- "onUpdate:current-page": _cache[0] || (_cache[0] = ($event) => _ctx.currentPage = $event),
6220
- "page-size": _ctx.pageSize,
6221
- "onUpdate:page-size": _cache[1] || (_cache[1] = ($event) => _ctx.pageSize = $event),
6222
- "page-size-options": _ctx.pageSizeOptions,
6223
- "page-format": _ctx.pageFormat,
6224
- compact: _ctx.compact,
6225
- total: _ctx.total,
6226
- "total-format": _ctx.totalFormat,
6227
- "page-sizer-width": _ctx.pageSizerWidth,
6228
- onNext: _cache[2] || (_cache[2] = ($event) => {
6229
- _ctx.$emit("next", $event);
6230
- _ctx.clearState();
6231
- }),
6232
- onPrev: _cache[3] || (_cache[3] = ($event) => {
6233
- _ctx.$emit("prev", $event);
6234
- _ctx.clearState();
6235
- }),
6236
- onPageChange: _cache[4] || (_cache[4] = ($event) => {
6237
- _ctx.$emit("pageChange", $event);
6238
- _ctx.clearState();
6239
- }),
6240
- onSizeChange: _cache[5] || (_cache[5] = ($event) => {
6241
- _ctx.$emit("sizeChange", $event);
6242
- _ctx.clearState();
6243
- })
6244
- }, null, 8, ["current-page", "page-size", "page-size-options", "page-format", "compact", "total", "total-format", "page-sizer-width"])
6245
- ])
6565
+ renderSlot(_ctx.$slots, "pagination", {}, () => {
6566
+ var _a2;
6567
+ return [
6568
+ !_ctx.isEmpty && ((_a2 = _ctx.pageLayout) == null ? void 0 : _a2.length) ? (openBlock(), createBlock(_component_dao_pagination, {
6569
+ key: 0,
6570
+ "current-page": _ctx.currentPage,
6571
+ "onUpdate:current-page": _cache[0] || (_cache[0] = ($event) => _ctx.currentPage = $event),
6572
+ "page-size": _ctx.pageSize,
6573
+ "onUpdate:page-size": _cache[1] || (_cache[1] = ($event) => _ctx.pageSize = $event),
6574
+ "page-size-options": _ctx.pageSizeOptions,
6575
+ "page-format": _ctx.pageFormat,
6576
+ compact: _ctx.compact,
6577
+ total: _ctx.total,
6578
+ "total-format": _ctx.totalFormat,
6579
+ layout: _ctx.pageLayout,
6580
+ "page-sizer-width": _ctx.pageSizerWidth,
6581
+ onNext: _cache[2] || (_cache[2] = ($event) => {
6582
+ _ctx.$emit("next", $event);
6583
+ _ctx.clearState();
6584
+ }),
6585
+ onPrev: _cache[3] || (_cache[3] = ($event) => {
6586
+ _ctx.$emit("prev", $event);
6587
+ _ctx.clearState();
6588
+ }),
6589
+ onPageChange: _cache[4] || (_cache[4] = ($event) => {
6590
+ _ctx.$emit("pageChange", $event);
6591
+ _ctx.clearState();
6592
+ }),
6593
+ onSizeChange: _cache[5] || (_cache[5] = ($event) => {
6594
+ _ctx.$emit("sizeChange", $event);
6595
+ _ctx.clearState();
6596
+ })
6597
+ }, null, 8, ["current-page", "page-size", "page-size-options", "page-format", "compact", "total", "total-format", "layout", "page-sizer-width"])) : createCommentVNode("", true)
6598
+ ];
6599
+ })
6246
6600
  ])
6247
- ]);
6601
+ ], 2);
6248
6602
  }
6249
6603
  var table = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2]]);
6250
6604
  var tabNav_scss_vue_type_style_index_0_src_lang = "";
@@ -6272,6 +6626,7 @@ const _sfc_main$2 = defineComponent({
6272
6626
  const tabNav = ref();
6273
6627
  let lineStyle;
6274
6628
  let setActiveLineStyle;
6629
+ let tabResizeObserver;
6275
6630
  const isLine = computed(() => props.type === "line");
6276
6631
  const renderLines = () => {
6277
6632
  if (!isLine.value) {
@@ -6295,19 +6650,22 @@ const _sfc_main$2 = defineComponent({
6295
6650
  hoverTab.value = void 0;
6296
6651
  }
6297
6652
  };
6298
- const activeLineStyle = ref();
6653
+ const activeLineStyle = ref({});
6299
6654
  setActiveLineStyle = () => {
6300
6655
  const tab = unref(activeTab);
6301
- activeLineStyle.value = tab ? {
6302
- "--active-line-width": `${tab.offsetWidth || 0}px`,
6303
- "--active-line-left": `${tab.offsetLeft || 0}px`
6304
- } : {};
6656
+ if (tab && tab.offsetWidth && tab.offsetLeft) {
6657
+ activeLineStyle.value = {
6658
+ "--active-line-width": `${tab.offsetWidth || 0}px`,
6659
+ "--active-line-left": `${tab.offsetLeft || 0}px`
6660
+ };
6661
+ }
6305
6662
  };
6306
- watch(activeTab, setActiveLineStyle);
6307
- nextTick(() => {
6308
- var _a;
6309
- if (tabNav.value) {
6310
- (_a = tabNav.value) == null ? void 0 : _a.addEventListener("DOMSubtreeModified", setActiveLineStyle);
6663
+ watch(activeTab, (val) => {
6664
+ setActiveLineStyle();
6665
+ tabResizeObserver == null ? void 0 : tabResizeObserver.disconnect();
6666
+ tabResizeObserver = new ResizeObserver(setActiveLineStyle);
6667
+ if (tabNav.value && val) {
6668
+ tabResizeObserver.observe(val);
6311
6669
  }
6312
6670
  });
6313
6671
  lineStyle = computed(() => __spreadValues(__spreadValues({}, activeLineStyle.value), hoverLineStyle.value));
@@ -6320,9 +6678,8 @@ const _sfc_main$2 = defineComponent({
6320
6678
  });
6321
6679
  onMounted(renderLines);
6322
6680
  onUnmounted(() => {
6323
- var _a;
6324
6681
  if (tabNav.value) {
6325
- (_a = tabNav.value) == null ? void 0 : _a.removeEventListener("DOMSubtreeModified", setActiveLineStyle);
6682
+ tabResizeObserver == null ? void 0 : tabResizeObserver.disconnect();
6326
6683
  }
6327
6684
  });
6328
6685
  const handleClick = (event, tab) => {
@@ -6416,11 +6773,11 @@ const _sfc_main$1 = defineComponent({
6416
6773
  const tabList = reactive([]);
6417
6774
  const tabBody = ref();
6418
6775
  const addTab = (tab, child) => {
6419
- var _a;
6776
+ var _a2;
6420
6777
  if (!child.value) {
6421
6778
  return;
6422
6779
  }
6423
- const index2 = Array.from(((_a = tabBody.value) == null ? void 0 : _a.children) || []).indexOf(child.value);
6780
+ const index2 = Array.from(((_a2 = tabBody.value) == null ? void 0 : _a2.children) || []).indexOf(child.value);
6424
6781
  if (index2 > -1) {
6425
6782
  tabList.splice(index2, 0, tab);
6426
6783
  }
@@ -6441,14 +6798,14 @@ const _sfc_main$1 = defineComponent({
6441
6798
  };
6442
6799
  }
6443
6800
  });
6444
- const _hoisted_1$1 = { class: "dao-tabs" };
6801
+ const _hoisted_1 = { class: "dao-tabs" };
6445
6802
  const _hoisted_2 = {
6446
6803
  ref: "tabBody",
6447
6804
  class: "dao-tabs-body"
6448
6805
  };
6449
6806
  function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
6450
6807
  const _component_tab_nav = resolveComponent("tab-nav");
6451
- return openBlock(), createElementBlock("div", _hoisted_1$1, [
6808
+ return openBlock(), createElementBlock("div", _hoisted_1, [
6452
6809
  createVNode(_component_tab_nav, {
6453
6810
  type: _ctx.type,
6454
6811
  "tab-list": _ctx.tabList,
@@ -6463,6 +6820,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
6463
6820
  ]);
6464
6821
  }
6465
6822
  var tabs = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
6823
+ var tabItem_scss_vue_type_style_index_0_src_lang = "";
6466
6824
  const _sfc_main = defineComponent({
6467
6825
  name: "DaoTabItem",
6468
6826
  props: {
@@ -6493,16 +6851,15 @@ const _sfc_main = defineComponent({
6493
6851
  };
6494
6852
  }
6495
6853
  });
6496
- const _hoisted_1 = {
6497
- ref: "tabItem",
6498
- class: "dao-tab-item"
6499
- };
6500
6854
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
6501
- return withDirectives((openBlock(), createElementBlock("div", _hoisted_1, [
6855
+ return openBlock(), createElementBlock("div", {
6856
+ ref: "tabItem",
6857
+ class: normalizeClass(["dao-tab-item", {
6858
+ "dao-tab-item--hidden": !_ctx.active
6859
+ }])
6860
+ }, [
6502
6861
  renderSlot(_ctx.$slots, "default")
6503
- ], 512)), [
6504
- [vShow, _ctx.active]
6505
- ]);
6862
+ ], 2);
6506
6863
  }
6507
6864
  var tabItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
6508
6865
  var components = /* @__PURE__ */ Object.freeze({