@dao-style/core 0.0.1-beta.12 → 0.0.1-beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/checkbox/checkbox-group.vue.d.ts +3 -2
- package/dist/components/checkbox/checkbox.vue.d.ts +14 -12
- package/dist/components/checkbox/props.d.ts +1 -0
- package/dist/components/drawer/drawer.vue.d.ts +2 -1
- package/dist/components/form/form-item.vue.d.ts +7 -0
- package/dist/components/input/input.vue.d.ts +3 -0
- package/dist/components/nav/nav-item.vue.d.ts +2 -2
- package/dist/components/nav/nav-sub.vue.d.ts +2 -2
- package/dist/components/pagination/pagination-props.d.ts +5 -0
- package/dist/components/pagination/pagination.vue.d.ts +19 -5
- package/dist/components/popper/popper.vue.d.ts +1 -1
- package/dist/components/select/option.vue.d.ts +5 -0
- package/dist/components/select/select.vue.d.ts +14 -1
- package/dist/components/select/types.d.ts +3 -0
- package/dist/components/table/table-props.d.ts +12 -0
- package/dist/components/table/table.vue.d.ts +29 -7
- package/dist/dao-style.es.js +712 -351
- package/dist/dao-style.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/utils/constant.d.ts +5 -4
- package/package.json +3 -1
package/dist/dao-style.es.js
CHANGED
|
@@ -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,
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
318
|
-
const _hoisted_4$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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
|
-
|
|
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
|
-
|
|
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$
|
|
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$
|
|
561
|
+
const _hoisted_3$b = {
|
|
547
562
|
key: 0,
|
|
548
563
|
class: "dao-checkbox__label"
|
|
549
564
|
};
|
|
550
|
-
const _hoisted_4$
|
|
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$
|
|
588
|
+
}), null, 16, _hoisted_1$q),
|
|
574
589
|
_hoisted_2$i
|
|
575
590
|
], 2),
|
|
576
|
-
_ctx.hasLabel ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
577
|
-
_ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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-
|
|
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-
|
|
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-
|
|
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$
|
|
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-
|
|
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-
|
|
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$
|
|
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$
|
|
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$
|
|
1161
|
-
const _hoisted_4$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
2517
|
-
_hoisted_3$
|
|
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$
|
|
2555
|
+
withDirectives(createElementVNode("div", _hoisted_2$g, _hoisted_4$7, 512), [
|
|
2539
2556
|
[vShow, _ctx.visibleArrow]
|
|
2540
2557
|
])
|
|
2541
|
-
], 42, _hoisted_1$
|
|
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: "
|
|
2572
|
+
default: "root"
|
|
2556
2573
|
},
|
|
2557
2574
|
boundary: {
|
|
2558
2575
|
type: [String, Object],
|
|
@@ -2620,16 +2637,32 @@ function updatePopperOptions(popperInstance, modifiers, popperOptions = {}) {
|
|
|
2620
2637
|
_modifiers = [modifiers];
|
|
2621
2638
|
}
|
|
2622
2639
|
popperInstance.setOptions((options) => {
|
|
2623
|
-
var
|
|
2640
|
+
var _a2, _b2;
|
|
2624
2641
|
return __spreadProps(__spreadValues(__spreadValues({}, options), popperOptions), {
|
|
2625
2642
|
modifiers: [
|
|
2626
|
-
...(
|
|
2627
|
-
...(
|
|
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, _e, _f, _g, _h;
|
|
2652
|
+
let internalRoot = "body";
|
|
2653
|
+
if (!app) {
|
|
2654
|
+
return internalRoot;
|
|
2655
|
+
}
|
|
2656
|
+
let ele = (_f = (_c = (_b2 = (_a2 = app == null ? void 0 : app.root) == null ? void 0 : _a2.appContext) == null ? void 0 : _b2.app) == null ? void 0 : _c._container) != null ? _f : (_e = (_d = app == null ? void 0 : app.root) == null ? void 0 : _d.vnode) == null ? void 0 : _e.el;
|
|
2657
|
+
if ((ele == null ? void 0 : ele.nodeType) !== Node.ELEMENT_NODE && (ele == null ? void 0 : ele.nodeType) !== Node.DOCUMENT_FRAGMENT_NODE && (ele == null ? void 0 : ele.nodeType) !== Node.DOCUMENT_NODE) {
|
|
2658
|
+
ele = ele == null ? void 0 : ele.parentNode;
|
|
2659
|
+
}
|
|
2660
|
+
const rootNode = (_g = ele == null ? void 0 : ele.getRootNode) == null ? void 0 : _g.call(ele);
|
|
2661
|
+
if (rootNode) {
|
|
2662
|
+
internalRoot = (_h = rootNode.body) != null ? _h : rootNode;
|
|
2663
|
+
}
|
|
2664
|
+
return internalRoot;
|
|
2665
|
+
}
|
|
2633
2666
|
const _sfc_main$v = defineComponent({
|
|
2634
2667
|
name: "DaoPopper",
|
|
2635
2668
|
components: {
|
|
@@ -2657,12 +2690,26 @@ const _sfc_main$v = defineComponent({
|
|
|
2657
2690
|
const isOpen = ref(false);
|
|
2658
2691
|
const actualAppendTo = ref("body");
|
|
2659
2692
|
const isTelDisabled = ref(false);
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2693
|
+
watch(appendTo, () => {
|
|
2694
|
+
const unrefAppendTo = unref(appendTo);
|
|
2695
|
+
if (unrefAppendTo === false) {
|
|
2696
|
+
isTelDisabled.value = true;
|
|
2697
|
+
} else if (unrefAppendTo === "root") {
|
|
2698
|
+
const vm = getCurrentInstance();
|
|
2699
|
+
if (vm == null ? void 0 : vm.root.isMounted) {
|
|
2700
|
+
actualAppendTo.value = getActualRoot(vm);
|
|
2701
|
+
} else {
|
|
2702
|
+
isTelDisabled.value = true;
|
|
2703
|
+
actualAppendTo.value = "body";
|
|
2704
|
+
onMounted(() => {
|
|
2705
|
+
actualAppendTo.value = getActualRoot(vm);
|
|
2706
|
+
isTelDisabled.value = false;
|
|
2707
|
+
});
|
|
2708
|
+
}
|
|
2709
|
+
} else {
|
|
2710
|
+
actualAppendTo.value = unrefAppendTo;
|
|
2711
|
+
}
|
|
2712
|
+
}, { immediate: true });
|
|
2666
2713
|
const instance = getCurrentInstance();
|
|
2667
2714
|
let popperInstance;
|
|
2668
2715
|
let _targetNode;
|
|
@@ -2670,8 +2717,8 @@ const _sfc_main$v = defineComponent({
|
|
|
2670
2717
|
let _arrowNode;
|
|
2671
2718
|
let _scheduleTimer;
|
|
2672
2719
|
const themeClass = computed(() => {
|
|
2673
|
-
var
|
|
2674
|
-
return (
|
|
2720
|
+
var _a2, _b2;
|
|
2721
|
+
return (_b2 = (_a2 = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a2.$options.daoPopperTheme) != null ? _b2 : "";
|
|
2675
2722
|
});
|
|
2676
2723
|
const showDelay = computed(() => {
|
|
2677
2724
|
const unrefDelay = unref(delay);
|
|
@@ -2688,7 +2735,7 @@ const _sfc_main$v = defineComponent({
|
|
|
2688
2735
|
return unrefDelay || 0;
|
|
2689
2736
|
});
|
|
2690
2737
|
const createPopper$1 = async () => {
|
|
2691
|
-
var
|
|
2738
|
+
var _a2;
|
|
2692
2739
|
if (popperInstance == null ? void 0 : popperInstance.destroy) {
|
|
2693
2740
|
popperInstance.destroy();
|
|
2694
2741
|
}
|
|
@@ -2729,7 +2776,7 @@ const _sfc_main$v = defineComponent({
|
|
|
2729
2776
|
}
|
|
2730
2777
|
});
|
|
2731
2778
|
}
|
|
2732
|
-
modifiers.push(...((
|
|
2779
|
+
modifiers.push(...((_a2 = unref(popperOptions)) == null ? void 0 : _a2.modifiers) || []);
|
|
2733
2780
|
const ppOptions = __spreadProps(__spreadValues({
|
|
2734
2781
|
strategy: "fixed",
|
|
2735
2782
|
placement: unref(placement)
|
|
@@ -2855,10 +2902,10 @@ const _sfc_main$v = defineComponent({
|
|
|
2855
2902
|
fn2(_popperNode, "mouseleave", hide);
|
|
2856
2903
|
break;
|
|
2857
2904
|
case "focus":
|
|
2858
|
-
fn2(_targetNode, "
|
|
2859
|
-
fn2(_popperNode, "
|
|
2860
|
-
fn2(_targetNode, "
|
|
2861
|
-
fn2(_popperNode, "
|
|
2905
|
+
fn2(_targetNode, "focusin", show);
|
|
2906
|
+
fn2(_popperNode, "focusin", show);
|
|
2907
|
+
fn2(_targetNode, "focusout", hide);
|
|
2908
|
+
fn2(_popperNode, "focusout", hide);
|
|
2862
2909
|
break;
|
|
2863
2910
|
}
|
|
2864
2911
|
});
|
|
@@ -2870,12 +2917,12 @@ const _sfc_main$v = defineComponent({
|
|
|
2870
2917
|
operateEventListeners(off);
|
|
2871
2918
|
};
|
|
2872
2919
|
const init = () => {
|
|
2873
|
-
var
|
|
2920
|
+
var _a2, _b2, _c, _d;
|
|
2874
2921
|
if (!slots.default) {
|
|
2875
2922
|
throw new Error("Trigger must be provided");
|
|
2876
2923
|
}
|
|
2877
|
-
_targetNode = (
|
|
2878
|
-
_popperNode = (
|
|
2924
|
+
_targetNode = (_a2 = unref(reference2)) == null ? void 0 : _a2.firstElementChild;
|
|
2925
|
+
_popperNode = (_b2 = unref(popper2)) == null ? void 0 : _b2.$el;
|
|
2879
2926
|
_arrowNode = (_d = (_c = unref(popper2)) == null ? void 0 : _c.$refs) == null ? void 0 : _d.arrow;
|
|
2880
2927
|
addEventListeners();
|
|
2881
2928
|
if (unref(isOpen) || unref(modelValue)) {
|
|
@@ -3043,7 +3090,7 @@ const _sfc_main$u = defineComponent({
|
|
|
3043
3090
|
},
|
|
3044
3091
|
appendTo: {
|
|
3045
3092
|
type: [String, Boolean, Object],
|
|
3046
|
-
default: "
|
|
3093
|
+
default: "root"
|
|
3047
3094
|
},
|
|
3048
3095
|
placement: {
|
|
3049
3096
|
type: String,
|
|
@@ -3069,11 +3116,11 @@ const _sfc_main$u = defineComponent({
|
|
|
3069
3116
|
const realOffset = computed(() => realTrigger.value === "hover" ? 0 : offset2.value);
|
|
3070
3117
|
const parentHideFn = inject("hide", NOOP);
|
|
3071
3118
|
const hide = () => {
|
|
3072
|
-
var
|
|
3119
|
+
var _a2;
|
|
3073
3120
|
if (realTrigger.value === "manual") {
|
|
3074
3121
|
return;
|
|
3075
3122
|
}
|
|
3076
|
-
(
|
|
3123
|
+
(_a2 = popper2.value) == null ? void 0 : _a2.hide();
|
|
3077
3124
|
parentHideFn == null ? void 0 : parentHideFn();
|
|
3078
3125
|
};
|
|
3079
3126
|
provide("hide", hide);
|
|
@@ -3086,7 +3133,7 @@ const _sfc_main$u = defineComponent({
|
|
|
3086
3133
|
};
|
|
3087
3134
|
}
|
|
3088
3135
|
});
|
|
3089
|
-
const _hoisted_1$
|
|
3136
|
+
const _hoisted_1$k = { tabindex: "0" };
|
|
3090
3137
|
function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3091
3138
|
const _component_dao_popper = resolveComponent("dao-popper");
|
|
3092
3139
|
return openBlock(), createBlock(_component_dao_popper, {
|
|
@@ -3097,13 +3144,14 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3097
3144
|
"popper-class": "dao-dropdown-menu-popper",
|
|
3098
3145
|
"visible-arrow": false,
|
|
3099
3146
|
offset: _ctx.realOffset,
|
|
3100
|
-
"model-value": _ctx.visible
|
|
3147
|
+
"model-value": _ctx.visible,
|
|
3148
|
+
transition: "dao-fade-slide-default"
|
|
3101
3149
|
}, {
|
|
3102
3150
|
content: withCtx(() => [
|
|
3103
3151
|
renderSlot(_ctx.$slots, "menu")
|
|
3104
3152
|
]),
|
|
3105
3153
|
default: withCtx(() => [
|
|
3106
|
-
createElementVNode("div", _hoisted_1$
|
|
3154
|
+
createElementVNode("div", _hoisted_1$k, [
|
|
3107
3155
|
renderSlot(_ctx.$slots, "default")
|
|
3108
3156
|
])
|
|
3109
3157
|
]),
|
|
@@ -3115,9 +3163,9 @@ var dropdownMenu_vue_vue_type_style_index_0_lang = "";
|
|
|
3115
3163
|
const _sfc_main$t = defineComponent({
|
|
3116
3164
|
name: "DaoDropdownMenu"
|
|
3117
3165
|
});
|
|
3118
|
-
const _hoisted_1$
|
|
3166
|
+
const _hoisted_1$j = { class: "dao-dropdown-menu" };
|
|
3119
3167
|
function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3120
|
-
return openBlock(), createElementBlock("ul", _hoisted_1$
|
|
3168
|
+
return openBlock(), createElementBlock("ul", _hoisted_1$j, [
|
|
3121
3169
|
renderSlot(_ctx.$slots, "default")
|
|
3122
3170
|
]);
|
|
3123
3171
|
}
|
|
@@ -3272,9 +3320,9 @@ const _sfc_main$r = defineComponent({
|
|
|
3272
3320
|
};
|
|
3273
3321
|
}
|
|
3274
3322
|
});
|
|
3275
|
-
const _hoisted_1$
|
|
3323
|
+
const _hoisted_1$i = { class: "dao-expansion" };
|
|
3276
3324
|
function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3277
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3325
|
+
return openBlock(), createElementBlock("div", _hoisted_1$i, [
|
|
3278
3326
|
renderSlot(_ctx.$slots, "default")
|
|
3279
3327
|
]);
|
|
3280
3328
|
}
|
|
@@ -3355,10 +3403,10 @@ const _sfc_main$q = defineComponent({
|
|
|
3355
3403
|
};
|
|
3356
3404
|
}
|
|
3357
3405
|
});
|
|
3358
|
-
const _hoisted_1$
|
|
3406
|
+
const _hoisted_1$h = { class: "dao-expansion-item-icon-container" };
|
|
3359
3407
|
const _hoisted_2$f = { class: "dao-expansion-item-title-container" };
|
|
3360
|
-
const _hoisted_3$
|
|
3361
|
-
const _hoisted_4$
|
|
3408
|
+
const _hoisted_3$8 = { class: "dao-expansion-item-title dao-exp-ellipsis" };
|
|
3409
|
+
const _hoisted_4$6 = { class: "dao-expansion-item-description dao-exp-ellipsis" };
|
|
3362
3410
|
const _hoisted_5$5 = { class: "dao-expansion-item-content-container" };
|
|
3363
3411
|
const _hoisted_6$3 = { class: "dao-expansion-item-content" };
|
|
3364
3412
|
function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -3372,7 +3420,7 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3372
3420
|
class: "dao-expansion-item-header",
|
|
3373
3421
|
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onItemClick && _ctx.onItemClick(...args))
|
|
3374
3422
|
}, [
|
|
3375
|
-
createElementVNode("div", _hoisted_1$
|
|
3423
|
+
createElementVNode("div", _hoisted_1$h, [
|
|
3376
3424
|
createVNode(_component_dao_icon, {
|
|
3377
3425
|
name: "icon-dropdown-line",
|
|
3378
3426
|
class: "dao-expansion-item-icon",
|
|
@@ -3380,12 +3428,12 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3380
3428
|
})
|
|
3381
3429
|
]),
|
|
3382
3430
|
createElementVNode("div", _hoisted_2$f, [
|
|
3383
|
-
createElementVNode("div", _hoisted_3$
|
|
3431
|
+
createElementVNode("div", _hoisted_3$8, [
|
|
3384
3432
|
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
3385
3433
|
createTextVNode(toDisplayString(_ctx.title), 1)
|
|
3386
3434
|
])
|
|
3387
3435
|
]),
|
|
3388
|
-
createElementVNode("div", _hoisted_4$
|
|
3436
|
+
createElementVNode("div", _hoisted_4$6, [
|
|
3389
3437
|
renderSlot(_ctx.$slots, "description", {}, () => [
|
|
3390
3438
|
createTextVNode(toDisplayString(_ctx.description), 1)
|
|
3391
3439
|
])
|
|
@@ -3455,7 +3503,9 @@ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3455
3503
|
error: "dao-form-item__error-message"
|
|
3456
3504
|
},
|
|
3457
3505
|
wrapper: {
|
|
3506
|
+
text: "dao-form-item__text-wrapper",
|
|
3458
3507
|
radio: "dao-form-item__radio-wrapper",
|
|
3508
|
+
checkbox: "dao-form-item__checkbox-wrapper",
|
|
3459
3509
|
switch: "dao-form-item__switch-wrapper",
|
|
3460
3510
|
footer: "dao-form-item__footer-wrapper"
|
|
3461
3511
|
}
|
|
@@ -3486,6 +3536,10 @@ const _sfc_main$n = defineComponent({
|
|
|
3486
3536
|
type: String,
|
|
3487
3537
|
default: ""
|
|
3488
3538
|
},
|
|
3539
|
+
required: {
|
|
3540
|
+
type: Boolean,
|
|
3541
|
+
default: false
|
|
3542
|
+
},
|
|
3489
3543
|
paddingTop: {
|
|
3490
3544
|
type: [Number, String],
|
|
3491
3545
|
default: 0
|
|
@@ -3524,30 +3578,31 @@ const _sfc_main$n = defineComponent({
|
|
|
3524
3578
|
};
|
|
3525
3579
|
}
|
|
3526
3580
|
});
|
|
3527
|
-
const _hoisted_1$
|
|
3528
|
-
const _hoisted_2$e = {
|
|
3581
|
+
const _hoisted_1$g = {
|
|
3529
3582
|
key: 0,
|
|
3530
3583
|
class: "dao-form-item__label-icon-wrapper"
|
|
3531
3584
|
};
|
|
3532
|
-
const
|
|
3533
|
-
const
|
|
3585
|
+
const _hoisted_2$e = { class: "dao-form-item__label-icon-label" };
|
|
3586
|
+
const _hoisted_3$7 = /* @__PURE__ */ createElementVNode("i", { class: "dao-form-item__label-icon icon-unknow" }, null, -1);
|
|
3534
3587
|
function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3535
3588
|
const _component_dao_tooltip = resolveComponent("dao-tooltip");
|
|
3536
|
-
return openBlock(), createElementBlock("div",
|
|
3589
|
+
return openBlock(), createElementBlock("div", {
|
|
3590
|
+
class: normalizeClass(["dao-form-item", { "is-required": _ctx.required }])
|
|
3591
|
+
}, [
|
|
3537
3592
|
createElementVNode("div", {
|
|
3538
3593
|
class: "dao-form-item__label",
|
|
3539
3594
|
style: normalizeStyle(_ctx.labelStyle)
|
|
3540
3595
|
}, [
|
|
3541
3596
|
renderSlot(_ctx.$slots, "label", {}, () => [
|
|
3542
3597
|
createTextVNode(toDisplayString(!_ctx.iconMessage ? _ctx.label : ""), 1),
|
|
3543
|
-
!!_ctx.iconMessage ? (openBlock(), createElementBlock("div",
|
|
3544
|
-
createElementVNode("span",
|
|
3598
|
+
!!_ctx.iconMessage ? (openBlock(), createElementBlock("div", _hoisted_1$g, [
|
|
3599
|
+
createElementVNode("span", _hoisted_2$e, toDisplayString(_ctx.label), 1),
|
|
3545
3600
|
createVNode(_component_dao_tooltip, {
|
|
3546
3601
|
content: _ctx.iconMessage,
|
|
3547
3602
|
placement: "top"
|
|
3548
3603
|
}, {
|
|
3549
3604
|
default: withCtx(() => [
|
|
3550
|
-
|
|
3605
|
+
_hoisted_3$7
|
|
3551
3606
|
]),
|
|
3552
3607
|
_: 1
|
|
3553
3608
|
}, 8, ["content"])
|
|
@@ -3560,7 +3615,7 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3560
3615
|
}, [
|
|
3561
3616
|
renderSlot(_ctx.$slots, "default")
|
|
3562
3617
|
], 4)
|
|
3563
|
-
]);
|
|
3618
|
+
], 2);
|
|
3564
3619
|
}
|
|
3565
3620
|
var formItem = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$l]]);
|
|
3566
3621
|
var formGroup_vue_vue_type_style_index_0_lang = "";
|
|
@@ -3573,10 +3628,10 @@ const _sfc_main$m = defineComponent({
|
|
|
3573
3628
|
}
|
|
3574
3629
|
}
|
|
3575
3630
|
});
|
|
3576
|
-
const _hoisted_1$
|
|
3631
|
+
const _hoisted_1$f = { class: "dao-form-group" };
|
|
3577
3632
|
const _hoisted_2$d = { class: "dao-form-group__title" };
|
|
3578
3633
|
function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3579
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3634
|
+
return openBlock(), createElementBlock("div", _hoisted_1$f, [
|
|
3580
3635
|
createElementVNode("div", _hoisted_2$d, [
|
|
3581
3636
|
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
3582
3637
|
createTextVNode(toDisplayString(_ctx.title), 1)
|
|
@@ -3682,8 +3737,8 @@ const _sfc_main$k = defineComponent({
|
|
|
3682
3737
|
setup(props) {
|
|
3683
3738
|
const parent = inject(breadcrumbKey, null);
|
|
3684
3739
|
const separator = computed(() => {
|
|
3685
|
-
var
|
|
3686
|
-
return (
|
|
3740
|
+
var _a2;
|
|
3741
|
+
return (_a2 = parent == null ? void 0 : parent.props) == null ? void 0 : _a2.separator;
|
|
3687
3742
|
});
|
|
3688
3743
|
const handleClick = () => {
|
|
3689
3744
|
const to = props == null ? void 0 : props.to;
|
|
@@ -3748,7 +3803,7 @@ const _sfc_main$j = defineComponent({
|
|
|
3748
3803
|
}
|
|
3749
3804
|
});
|
|
3750
3805
|
function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3751
|
-
var
|
|
3806
|
+
var _a2;
|
|
3752
3807
|
const _component_dao_icon = resolveComponent("dao-icon");
|
|
3753
3808
|
const _component_dao_breadcrumb_item = resolveComponent("dao-breadcrumb-item");
|
|
3754
3809
|
return openBlock(), createElementBlock("div", {
|
|
@@ -3768,7 +3823,7 @@ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3768
3823
|
}, null, 8, ["name"])
|
|
3769
3824
|
])
|
|
3770
3825
|
], 2)) : createCommentVNode("", true),
|
|
3771
|
-
((
|
|
3826
|
+
((_a2 = _ctx.list) == null ? void 0 : _a2.length) ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.list, (item, index2) => {
|
|
3772
3827
|
return openBlock(), createBlock(_component_dao_breadcrumb_item, {
|
|
3773
3828
|
key: index2,
|
|
3774
3829
|
label: item.label,
|
|
@@ -3848,6 +3903,9 @@ var inputProps = {
|
|
|
3848
3903
|
var input_vue_vue_type_style_index_0_lang = "";
|
|
3849
3904
|
const _sfc_main$i = defineComponent({
|
|
3850
3905
|
name: "DaoInput",
|
|
3906
|
+
components: {
|
|
3907
|
+
DaoIcon
|
|
3908
|
+
},
|
|
3851
3909
|
inheritAttrs: false,
|
|
3852
3910
|
props: inputProps,
|
|
3853
3911
|
emits: ["update:modelValue", "input", "change", "blur", "focus", "after-reset"],
|
|
@@ -3892,12 +3950,31 @@ const _sfc_main$i = defineComponent({
|
|
|
3892
3950
|
`${prefixCls}--size-${size.value}`,
|
|
3893
3951
|
{
|
|
3894
3952
|
[`${prefixCls}--search`]: type.value === "search",
|
|
3953
|
+
[`${prefixCls}--password`]: type.value === "password",
|
|
3895
3954
|
[`${prefixCls}--${status.value}`]: ["error", "success", "loading"].includes(status.value),
|
|
3896
3955
|
[`${prefixCls}--borderless`]: borderless.value,
|
|
3897
3956
|
[`${prefixCls}--block`]: block.value,
|
|
3898
3957
|
[`${prefixCls}--with-append`]: !!append.value
|
|
3899
3958
|
}
|
|
3900
3959
|
]);
|
|
3960
|
+
const isShowPassword = ref(false);
|
|
3961
|
+
const inputType = computed(() => {
|
|
3962
|
+
if (type.value === "password") {
|
|
3963
|
+
if (isShowPassword.value) {
|
|
3964
|
+
return "text";
|
|
3965
|
+
}
|
|
3966
|
+
}
|
|
3967
|
+
return type.value;
|
|
3968
|
+
});
|
|
3969
|
+
function toggleShowPassword() {
|
|
3970
|
+
isShowPassword.value = !isShowPassword.value;
|
|
3971
|
+
}
|
|
3972
|
+
const passwordIcon = computed(() => {
|
|
3973
|
+
if (isShowPassword.value) {
|
|
3974
|
+
return "icon-eye";
|
|
3975
|
+
}
|
|
3976
|
+
return "icon-eye-slash";
|
|
3977
|
+
});
|
|
3901
3978
|
const statusClasses = computed(() => statusMap[status.value]);
|
|
3902
3979
|
const setCurrentValue = (val) => {
|
|
3903
3980
|
if (val === currentValue.value) {
|
|
@@ -3918,17 +3995,17 @@ const _sfc_main$i = defineComponent({
|
|
|
3918
3995
|
emit("change", val);
|
|
3919
3996
|
};
|
|
3920
3997
|
const resetCurrentVal = () => {
|
|
3921
|
-
var
|
|
3998
|
+
var _a2;
|
|
3922
3999
|
if (disabled.value || type.value !== "search") {
|
|
3923
4000
|
return;
|
|
3924
4001
|
}
|
|
3925
4002
|
updateModel("");
|
|
3926
4003
|
emit("after-reset");
|
|
3927
|
-
(
|
|
4004
|
+
(_a2 = input2.value) == null ? void 0 : _a2.focus();
|
|
3928
4005
|
};
|
|
3929
4006
|
const getInputRealNumber = (val, fixedPointNum) => parseFloat(val.toFixed(fixedPointNum));
|
|
3930
4007
|
const changeNumberValue = (changeType) => {
|
|
3931
|
-
var
|
|
4008
|
+
var _a2;
|
|
3932
4009
|
if (type.value !== "number") {
|
|
3933
4010
|
return;
|
|
3934
4011
|
}
|
|
@@ -3957,7 +4034,7 @@ const _sfc_main$i = defineComponent({
|
|
|
3957
4034
|
setValue = minimum;
|
|
3958
4035
|
}
|
|
3959
4036
|
updateModel(getInputRealNumber(setValue, stepPointNum));
|
|
3960
|
-
(
|
|
4037
|
+
(_a2 = input2.value) == null ? void 0 : _a2.focus();
|
|
3961
4038
|
if (!counterTimeout && !counterInterval) {
|
|
3962
4039
|
counterTimeout = window.setTimeout(() => {
|
|
3963
4040
|
counterInterval = window.setInterval(() => changeNumberValue(changeType), 100);
|
|
@@ -3965,7 +4042,7 @@ const _sfc_main$i = defineComponent({
|
|
|
3965
4042
|
}
|
|
3966
4043
|
};
|
|
3967
4044
|
const onInputNumberMouseup = (event) => {
|
|
3968
|
-
var
|
|
4045
|
+
var _a2;
|
|
3969
4046
|
if (isChangingNumber.value) {
|
|
3970
4047
|
event.preventDefault();
|
|
3971
4048
|
}
|
|
@@ -3980,7 +4057,7 @@ const _sfc_main$i = defineComponent({
|
|
|
3980
4057
|
counterInterval = null;
|
|
3981
4058
|
isChangingNumber.value = false;
|
|
3982
4059
|
if (onEvents) {
|
|
3983
|
-
(
|
|
4060
|
+
(_a2 = input2.value) == null ? void 0 : _a2.focus();
|
|
3984
4061
|
}
|
|
3985
4062
|
};
|
|
3986
4063
|
const inputAttrs = computed(() => {
|
|
@@ -4028,11 +4105,14 @@ const _sfc_main$i = defineComponent({
|
|
|
4028
4105
|
changeNumberValue,
|
|
4029
4106
|
isIncreaseDisabled,
|
|
4030
4107
|
isDecreaseDisabled,
|
|
4031
|
-
isChangingNumber
|
|
4108
|
+
isChangingNumber,
|
|
4109
|
+
inputType,
|
|
4110
|
+
passwordIcon,
|
|
4111
|
+
toggleShowPassword
|
|
4032
4112
|
};
|
|
4033
4113
|
}
|
|
4034
4114
|
});
|
|
4035
|
-
const _hoisted_1$
|
|
4115
|
+
const _hoisted_1$e = {
|
|
4036
4116
|
key: 0,
|
|
4037
4117
|
class: "dao-input-prepend"
|
|
4038
4118
|
};
|
|
@@ -4040,9 +4120,9 @@ const _hoisted_2$c = {
|
|
|
4040
4120
|
key: 0,
|
|
4041
4121
|
class: "dao-input-prefix"
|
|
4042
4122
|
};
|
|
4043
|
-
const _hoisted_3$
|
|
4044
|
-
const _hoisted_4$
|
|
4045
|
-
key:
|
|
4123
|
+
const _hoisted_3$6 = ["type", "disabled", "value"];
|
|
4124
|
+
const _hoisted_4$5 = {
|
|
4125
|
+
key: 4,
|
|
4046
4126
|
class: "dao-input-suffix"
|
|
4047
4127
|
};
|
|
4048
4128
|
const _hoisted_5$4 = {
|
|
@@ -4050,11 +4130,12 @@ const _hoisted_5$4 = {
|
|
|
4050
4130
|
class: "dao-input-append"
|
|
4051
4131
|
};
|
|
4052
4132
|
function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4133
|
+
const _component_dao_icon = resolveComponent("dao-icon");
|
|
4053
4134
|
return openBlock(), createElementBlock("div", {
|
|
4054
4135
|
class: normalizeClass(_ctx.wrapClasses)
|
|
4055
4136
|
}, [
|
|
4056
4137
|
renderSlot(_ctx.$slots, "prepend", {}, () => [
|
|
4057
|
-
_ctx.prepend ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
4138
|
+
_ctx.prepend ? (openBlock(), createElementBlock("div", _hoisted_1$e, toDisplayString(_ctx.prepend), 1)) : createCommentVNode("", true)
|
|
4058
4139
|
]),
|
|
4059
4140
|
createElementVNode("div", {
|
|
4060
4141
|
class: normalizeClass(["dao-input-inner", { "dao-input__changing-number": _ctx.isChangingNumber }])
|
|
@@ -4070,11 +4151,11 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4070
4151
|
ref: "input",
|
|
4071
4152
|
class: _ctx.inputClasses
|
|
4072
4153
|
}, _ctx.inputAttrs, {
|
|
4073
|
-
type: _ctx.
|
|
4154
|
+
type: _ctx.inputType,
|
|
4074
4155
|
disabled: _ctx.disabled,
|
|
4075
4156
|
value: _ctx.currentValue,
|
|
4076
4157
|
onKeyup: _cache[0] || (_cache[0] = withKeys((...args) => _ctx.resetCurrentVal && _ctx.resetCurrentVal(...args), ["esc"]))
|
|
4077
|
-
}), null, 16, _hoisted_3$
|
|
4158
|
+
}), null, 16, _hoisted_3$6),
|
|
4078
4159
|
_ctx.type === "number" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
4079
4160
|
createElementVNode("i", {
|
|
4080
4161
|
class: normalizeClass([
|
|
@@ -4095,6 +4176,13 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4095
4176
|
onMousedown: _cache[2] || (_cache[2] = ($event) => _ctx.changeNumberValue("decrease"))
|
|
4096
4177
|
}, null, 34)
|
|
4097
4178
|
], 64)) : createCommentVNode("", true),
|
|
4179
|
+
_ctx.type === "password" ? (openBlock(), createBlock(_component_dao_icon, {
|
|
4180
|
+
key: 3,
|
|
4181
|
+
"use-font": "",
|
|
4182
|
+
class: "dao-input-password-icon",
|
|
4183
|
+
name: _ctx.passwordIcon,
|
|
4184
|
+
onClick: _ctx.toggleShowPassword
|
|
4185
|
+
}, null, 8, ["name", "onClick"])) : createCommentVNode("", true),
|
|
4098
4186
|
withDirectives(createElementVNode("i", {
|
|
4099
4187
|
class: normalizeClass(["dao-input-close-icon", "icon-sys-error", { "dao-input__active": _ctx.isFocus }]),
|
|
4100
4188
|
onClick: _cache[3] || (_cache[3] = ($event) => _ctx.resetCurrentVal())
|
|
@@ -4102,11 +4190,11 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4102
4190
|
[vShow, _ctx.clearable]
|
|
4103
4191
|
]),
|
|
4104
4192
|
withDirectives(createElementVNode("i", {
|
|
4105
|
-
class: normalizeClass(_ctx.statusClasses)
|
|
4193
|
+
class: normalizeClass([_ctx.statusClasses, "dao-input-status-icon"])
|
|
4106
4194
|
}, null, 2), [
|
|
4107
4195
|
[vShow, ["error", "success", "loading"].includes(_ctx.status)]
|
|
4108
4196
|
]),
|
|
4109
|
-
_ctx.slots.suffix ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
4197
|
+
_ctx.slots.suffix ? (openBlock(), createElementBlock("div", _hoisted_4$5, [
|
|
4110
4198
|
renderSlot(_ctx.$slots, "suffix")
|
|
4111
4199
|
])) : createCommentVNode("", true)
|
|
4112
4200
|
], 2),
|
|
@@ -4186,13 +4274,13 @@ const _sfc_main$h = defineComponent({
|
|
|
4186
4274
|
};
|
|
4187
4275
|
}
|
|
4188
4276
|
});
|
|
4189
|
-
const _hoisted_1$
|
|
4277
|
+
const _hoisted_1$d = { class: "dao-message-icon" };
|
|
4190
4278
|
const _hoisted_2$b = { class: "dao-message-section" };
|
|
4191
|
-
const _hoisted_3$
|
|
4279
|
+
const _hoisted_3$5 = {
|
|
4192
4280
|
key: 0,
|
|
4193
4281
|
class: "dao-message-title"
|
|
4194
4282
|
};
|
|
4195
|
-
const _hoisted_4$
|
|
4283
|
+
const _hoisted_4$4 = {
|
|
4196
4284
|
key: 0,
|
|
4197
4285
|
class: "dao-message-content"
|
|
4198
4286
|
};
|
|
@@ -4207,7 +4295,7 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4207
4295
|
createElementVNode("div", {
|
|
4208
4296
|
class: normalizeClass(["dao-message-inner", { "dao-message-inner-without-close": !_ctx.isCloseShow }])
|
|
4209
4297
|
}, [
|
|
4210
|
-
createElementVNode("div", _hoisted_1$
|
|
4298
|
+
createElementVNode("div", _hoisted_1$d, [
|
|
4211
4299
|
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
4212
4300
|
createElementVNode("i", {
|
|
4213
4301
|
class: normalizeClass(`icon-sys-${_ctx.type} dao-message-icon-general dao-message-icon-${_ctx.type}`)
|
|
@@ -4217,10 +4305,10 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4217
4305
|
createElementVNode("div", _hoisted_2$b, [
|
|
4218
4306
|
renderSlot(_ctx.$slots, "section", {}, () => [
|
|
4219
4307
|
renderSlot(_ctx.$slots, "title", { className: "dao-message-title" }, () => [
|
|
4220
|
-
_ctx.title ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
4308
|
+
_ctx.title ? (openBlock(), createElementBlock("div", _hoisted_3$5, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true)
|
|
4221
4309
|
]),
|
|
4222
4310
|
renderSlot(_ctx.$slots, "default", { className: "dao-message-content" }, () => [
|
|
4223
|
-
_ctx.content ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
4311
|
+
_ctx.content ? (openBlock(), createElementBlock("div", _hoisted_4$4, toDisplayString(_ctx.content), 1)) : createCommentVNode("", true)
|
|
4224
4312
|
])
|
|
4225
4313
|
])
|
|
4226
4314
|
]),
|
|
@@ -4403,10 +4491,10 @@ const _sfc_main$g = defineComponent({
|
|
|
4403
4491
|
});
|
|
4404
4492
|
}
|
|
4405
4493
|
});
|
|
4406
|
-
const _hoisted_1$
|
|
4494
|
+
const _hoisted_1$c = { class: "dao-nav-bar" };
|
|
4407
4495
|
const _hoisted_2$a = { class: "dao-nav" };
|
|
4408
4496
|
function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4409
|
-
return openBlock(), createElementBlock("nav", _hoisted_1$
|
|
4497
|
+
return openBlock(), createElementBlock("nav", _hoisted_1$c, [
|
|
4410
4498
|
renderSlot(_ctx.$slots, "header"),
|
|
4411
4499
|
createElementVNode("ul", _hoisted_2$a, [
|
|
4412
4500
|
renderSlot(_ctx.$slots, "default")
|
|
@@ -4449,7 +4537,7 @@ const _sfc_main$f = defineComponent({
|
|
|
4449
4537
|
};
|
|
4450
4538
|
}
|
|
4451
4539
|
});
|
|
4452
|
-
const _hoisted_1$
|
|
4540
|
+
const _hoisted_1$b = { class: "dao-nav__head-text dao-nav-text" };
|
|
4453
4541
|
function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4454
4542
|
const _component_dao_icon = resolveComponent("dao-icon");
|
|
4455
4543
|
return openBlock(), createElementBlock("li", {
|
|
@@ -4465,7 +4553,7 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4465
4553
|
onClick: _ctx.handleClickBack,
|
|
4466
4554
|
onKeyup: withKeys(withModifiers(_ctx.handleClickBack, ["stop"]), ["esc"])
|
|
4467
4555
|
}, null, 8, ["name", "use-font", "onClick", "onKeyup"])) : createCommentVNode("", true),
|
|
4468
|
-
createElementVNode("span", _hoisted_1$
|
|
4556
|
+
createElementVNode("span", _hoisted_1$b, toDisplayString(_ctx.title), 1)
|
|
4469
4557
|
])
|
|
4470
4558
|
], 2);
|
|
4471
4559
|
}
|
|
@@ -4551,7 +4639,7 @@ const _sfc_main$e = defineComponent({
|
|
|
4551
4639
|
};
|
|
4552
4640
|
}
|
|
4553
4641
|
});
|
|
4554
|
-
const _hoisted_1$
|
|
4642
|
+
const _hoisted_1$a = { class: "dao-nav-slot" };
|
|
4555
4643
|
const _hoisted_2$9 = { class: "dao-nav__item-text dao-nav-text" };
|
|
4556
4644
|
function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4557
4645
|
const _component_dao_icon = resolveComponent("dao-icon");
|
|
@@ -4564,7 +4652,7 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4564
4652
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args)),
|
|
4565
4653
|
onKeyup: _cache[1] || (_cache[1] = withKeys((...args) => _ctx.handleClick && _ctx.handleClick(...args), ["enter"]))
|
|
4566
4654
|
}, [
|
|
4567
|
-
createElementVNode("div", _hoisted_1$
|
|
4655
|
+
createElementVNode("div", _hoisted_1$a, [
|
|
4568
4656
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
4569
4657
|
_ctx.showIcon ? (openBlock(), createBlock(_component_dao_icon, {
|
|
4570
4658
|
key: 0,
|
|
@@ -4701,13 +4789,13 @@ const _sfc_main$d = defineComponent({
|
|
|
4701
4789
|
};
|
|
4702
4790
|
}
|
|
4703
4791
|
});
|
|
4704
|
-
const _hoisted_1$
|
|
4792
|
+
const _hoisted_1$9 = { class: "dao-nav-slot" };
|
|
4705
4793
|
const _hoisted_2$8 = { class: "dao-nav__sub-text dao-nav-text" };
|
|
4706
|
-
const _hoisted_3$
|
|
4794
|
+
const _hoisted_3$4 = {
|
|
4707
4795
|
key: 0,
|
|
4708
4796
|
class: "icon-dropdown-line dao-nav__sub__icon-fold"
|
|
4709
4797
|
};
|
|
4710
|
-
const _hoisted_4$
|
|
4798
|
+
const _hoisted_4$3 = /* @__PURE__ */ createElementVNode("span", { class: "dao-nav__sub-gap" }, null, -1);
|
|
4711
4799
|
const _hoisted_5$3 = { class: "dao-nav dao-nav-inner" };
|
|
4712
4800
|
const _hoisted_6$2 = /* @__PURE__ */ createElementVNode("span", { class: "dao-nav__sub-gap" }, null, -1);
|
|
4713
4801
|
function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -4721,7 +4809,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4721
4809
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args)),
|
|
4722
4810
|
onKeyup: _cache[1] || (_cache[1] = withKeys((...args) => _ctx.handleClick && _ctx.handleClick(...args), ["enter"]))
|
|
4723
4811
|
}, [
|
|
4724
|
-
createElementVNode("div", _hoisted_1$
|
|
4812
|
+
createElementVNode("div", _hoisted_1$9, [
|
|
4725
4813
|
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
4726
4814
|
_ctx.showIcon ? (openBlock(), createBlock(_component_dao_icon, {
|
|
4727
4815
|
key: 0,
|
|
@@ -4732,12 +4820,12 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4732
4820
|
createElementVNode("span", _hoisted_2$8, toDisplayString(_ctx.title), 1)
|
|
4733
4821
|
])
|
|
4734
4822
|
]),
|
|
4735
|
-
_ctx.fold ? (openBlock(), createElementBlock("i", _hoisted_3$
|
|
4823
|
+
_ctx.fold ? (openBlock(), createElementBlock("i", _hoisted_3$4)) : createCommentVNode("", true)
|
|
4736
4824
|
], 34),
|
|
4737
4825
|
createVNode(Transition, { name: "dao-nav" }, {
|
|
4738
4826
|
default: withCtx(() => [
|
|
4739
4827
|
withDirectives(createElementVNode("div", null, [
|
|
4740
|
-
_hoisted_4$
|
|
4828
|
+
_hoisted_4$3,
|
|
4741
4829
|
createElementVNode("ul", _hoisted_5$3, [
|
|
4742
4830
|
renderSlot(_ctx.$slots, "default")
|
|
4743
4831
|
]),
|
|
@@ -4786,14 +4874,105 @@ const paginationProps = {
|
|
|
4786
4874
|
pageSizerWidth: {
|
|
4787
4875
|
type: Number,
|
|
4788
4876
|
default: 110
|
|
4877
|
+
},
|
|
4878
|
+
layout: {
|
|
4879
|
+
type: Array,
|
|
4880
|
+
default: ["total", "pager", "sizer"]
|
|
4881
|
+
}
|
|
4882
|
+
};
|
|
4883
|
+
function tryOnScopeDispose(fn2) {
|
|
4884
|
+
if (getCurrentScope()) {
|
|
4885
|
+
onScopeDispose(fn2);
|
|
4886
|
+
return true;
|
|
4789
4887
|
}
|
|
4888
|
+
return false;
|
|
4889
|
+
}
|
|
4890
|
+
const isClient = typeof window !== "undefined";
|
|
4891
|
+
const isString = (val) => typeof val === "string";
|
|
4892
|
+
const noop = () => {
|
|
4790
4893
|
};
|
|
4894
|
+
function unrefElement(elRef) {
|
|
4895
|
+
var _a2;
|
|
4896
|
+
const plain = unref(elRef);
|
|
4897
|
+
return (_a2 = plain == null ? void 0 : plain.$el) != null ? _a2 : plain;
|
|
4898
|
+
}
|
|
4899
|
+
const defaultWindow = isClient ? window : void 0;
|
|
4900
|
+
isClient ? window.document : void 0;
|
|
4901
|
+
isClient ? window.navigator : void 0;
|
|
4902
|
+
isClient ? window.location : void 0;
|
|
4903
|
+
function useEventListener(...args) {
|
|
4904
|
+
let target;
|
|
4905
|
+
let event;
|
|
4906
|
+
let listener;
|
|
4907
|
+
let options;
|
|
4908
|
+
if (isString(args[0])) {
|
|
4909
|
+
[event, listener, options] = args;
|
|
4910
|
+
target = defaultWindow;
|
|
4911
|
+
} else {
|
|
4912
|
+
[target, event, listener, options] = args;
|
|
4913
|
+
}
|
|
4914
|
+
if (!target)
|
|
4915
|
+
return noop;
|
|
4916
|
+
let cleanup = noop;
|
|
4917
|
+
const stopWatch = watch(() => unrefElement(target), (el) => {
|
|
4918
|
+
cleanup();
|
|
4919
|
+
if (!el)
|
|
4920
|
+
return;
|
|
4921
|
+
el.addEventListener(event, listener, options);
|
|
4922
|
+
cleanup = () => {
|
|
4923
|
+
el.removeEventListener(event, listener, options);
|
|
4924
|
+
cleanup = noop;
|
|
4925
|
+
};
|
|
4926
|
+
}, { immediate: true, flush: "post" });
|
|
4927
|
+
const stop = () => {
|
|
4928
|
+
stopWatch();
|
|
4929
|
+
cleanup();
|
|
4930
|
+
};
|
|
4931
|
+
tryOnScopeDispose(stop);
|
|
4932
|
+
return stop;
|
|
4933
|
+
}
|
|
4934
|
+
function onClickOutside(target, handler, options = {}) {
|
|
4935
|
+
const { window: window2 = defaultWindow, ignore, capture = true } = options;
|
|
4936
|
+
if (!window2)
|
|
4937
|
+
return;
|
|
4938
|
+
const shouldListen = ref(true);
|
|
4939
|
+
const listener = (event) => {
|
|
4940
|
+
const el = unrefElement(target);
|
|
4941
|
+
const composedPath = event.composedPath();
|
|
4942
|
+
if (!el || el === event.target || composedPath.includes(el) || !shouldListen.value)
|
|
4943
|
+
return;
|
|
4944
|
+
if (ignore && ignore.length > 0) {
|
|
4945
|
+
if (ignore.some((target2) => {
|
|
4946
|
+
const el2 = unrefElement(target2);
|
|
4947
|
+
return el2 && (event.target === el2 || composedPath.includes(el2));
|
|
4948
|
+
}))
|
|
4949
|
+
return;
|
|
4950
|
+
}
|
|
4951
|
+
handler(event);
|
|
4952
|
+
};
|
|
4953
|
+
const cleanup = [
|
|
4954
|
+
useEventListener(window2, "click", listener, { passive: true, capture }),
|
|
4955
|
+
useEventListener(window2, "pointerdown", (e) => {
|
|
4956
|
+
const el = unrefElement(target);
|
|
4957
|
+
shouldListen.value = !!el && !e.composedPath().includes(el);
|
|
4958
|
+
}, { passive: true })
|
|
4959
|
+
];
|
|
4960
|
+
const stop = () => cleanup.forEach((fn2) => fn2());
|
|
4961
|
+
return stop;
|
|
4962
|
+
}
|
|
4963
|
+
const _global = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
4964
|
+
const globalKey = "__vueuse_ssr_handlers__";
|
|
4965
|
+
_global[globalKey] = _global[globalKey] || {};
|
|
4966
|
+
_global[globalKey];
|
|
4967
|
+
var _a, _b;
|
|
4968
|
+
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
4969
|
var select_vue_vue_type_style_index_0_lang = "";
|
|
4792
4970
|
const _sfc_main$c = defineComponent({
|
|
4793
4971
|
name: "DaoSelect",
|
|
4794
4972
|
components: {
|
|
4795
4973
|
DaoPopper: Popper
|
|
4796
4974
|
},
|
|
4975
|
+
directives: {},
|
|
4797
4976
|
props: {
|
|
4798
4977
|
modelValue: {
|
|
4799
4978
|
type: [String, Number, Boolean],
|
|
@@ -4830,7 +5009,7 @@ const _sfc_main$c = defineComponent({
|
|
|
4830
5009
|
},
|
|
4831
5010
|
appendTo: {
|
|
4832
5011
|
type: [String, Boolean, Object],
|
|
4833
|
-
default: "
|
|
5012
|
+
default: "root"
|
|
4834
5013
|
}
|
|
4835
5014
|
},
|
|
4836
5015
|
emits: ["update:modelValue", "change", "search-change", "close", "open"],
|
|
@@ -4843,12 +5022,15 @@ const _sfc_main$c = defineComponent({
|
|
|
4843
5022
|
search
|
|
4844
5023
|
} = toRefs(props);
|
|
4845
5024
|
const state = reactive({
|
|
5025
|
+
optionFocusIndex: -1,
|
|
5026
|
+
visible: false,
|
|
4846
5027
|
selectedOption: void 0,
|
|
4847
5028
|
options: [],
|
|
4848
5029
|
searchText: ""
|
|
4849
5030
|
});
|
|
4850
5031
|
const popper2 = ref(null);
|
|
4851
5032
|
const searchInput = ref(null);
|
|
5033
|
+
const triggerRef = ref(null);
|
|
4852
5034
|
const instance = getCurrentInstance();
|
|
4853
5035
|
provide("select", instance);
|
|
4854
5036
|
const popperOffset = computed(() => {
|
|
@@ -4881,8 +5063,8 @@ const _sfc_main$c = defineComponent({
|
|
|
4881
5063
|
return classNames.join(" ");
|
|
4882
5064
|
});
|
|
4883
5065
|
const isSelected = computed(() => {
|
|
4884
|
-
var
|
|
4885
|
-
return !isNullish((
|
|
5066
|
+
var _a2;
|
|
5067
|
+
return !isNullish((_a2 = state.selectedOption) == null ? void 0 : _a2.value);
|
|
4886
5068
|
});
|
|
4887
5069
|
const isNoResult = computed(() => {
|
|
4888
5070
|
const unrefSearch = unref(search);
|
|
@@ -4904,31 +5086,40 @@ const _sfc_main$c = defineComponent({
|
|
|
4904
5086
|
}
|
|
4905
5087
|
]
|
|
4906
5088
|
}));
|
|
5089
|
+
const onSearchClear = () => {
|
|
5090
|
+
var _a2;
|
|
5091
|
+
state.searchText = "";
|
|
5092
|
+
state.options.forEach((option) => {
|
|
5093
|
+
option.setVisible(true);
|
|
5094
|
+
});
|
|
5095
|
+
(_a2 = searchInput.value) == null ? void 0 : _a2.focus();
|
|
5096
|
+
};
|
|
4907
5097
|
const onSelect = (option) => {
|
|
4908
5098
|
const unrefPopper = unref(popper2);
|
|
4909
5099
|
state.selectedOption = option;
|
|
5100
|
+
onSearchClear();
|
|
4910
5101
|
emit("update:modelValue", state.selectedOption.value);
|
|
4911
5102
|
emit("change", state.selectedOption.value);
|
|
4912
5103
|
unrefPopper == null ? void 0 : unrefPopper.hide();
|
|
4913
5104
|
};
|
|
4914
5105
|
const checkUpdatedOption = () => {
|
|
4915
|
-
var
|
|
5106
|
+
var _a2;
|
|
4916
5107
|
const unrefModelValue = unref(modelValue);
|
|
4917
|
-
if (!isNullish(unrefModelValue) && unrefModelValue !== ((
|
|
5108
|
+
if (!isNullish(unrefModelValue) && unrefModelValue !== ((_a2 = state.selectedOption) == null ? void 0 : _a2.value)) {
|
|
4918
5109
|
const target = state.options.find((o) => o.value === unrefModelValue);
|
|
4919
5110
|
state.selectedOption = target;
|
|
4920
5111
|
}
|
|
4921
5112
|
};
|
|
4922
5113
|
const checkNewOption = (option) => {
|
|
4923
|
-
var
|
|
5114
|
+
var _a2;
|
|
4924
5115
|
const unrefModelValue = unref(modelValue);
|
|
4925
|
-
if (!isNullish(unrefModelValue) && isNullish((
|
|
5116
|
+
if (!isNullish(unrefModelValue) && isNullish((_a2 = state.selectedOption) == null ? void 0 : _a2.value) && unrefModelValue === option.value) {
|
|
4926
5117
|
state.selectedOption = option;
|
|
4927
5118
|
}
|
|
4928
5119
|
};
|
|
4929
5120
|
const checkRemovedOption = (option) => {
|
|
4930
|
-
var
|
|
4931
|
-
if (((
|
|
5121
|
+
var _a2;
|
|
5122
|
+
if (((_a2 = state.selectedOption) == null ? void 0 : _a2.value) === option.value) {
|
|
4932
5123
|
state.selectedOption = void 0;
|
|
4933
5124
|
}
|
|
4934
5125
|
};
|
|
@@ -4948,14 +5139,6 @@ const _sfc_main$c = defineComponent({
|
|
|
4948
5139
|
});
|
|
4949
5140
|
emit("search-change", searchContent);
|
|
4950
5141
|
};
|
|
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
5142
|
const remove = (index2) => {
|
|
4960
5143
|
if (index2 > -1) {
|
|
4961
5144
|
const [removed] = state.options.splice(index2, 1);
|
|
@@ -4973,8 +5156,106 @@ const _sfc_main$c = defineComponent({
|
|
|
4973
5156
|
provide("remove", remove);
|
|
4974
5157
|
provide("selectState", state);
|
|
4975
5158
|
watch(modelValue, () => checkUpdatedOption());
|
|
5159
|
+
const bindTriggerEleOutsideClick = {
|
|
5160
|
+
cleanup: void 0,
|
|
5161
|
+
visible() {
|
|
5162
|
+
if (!this.cleanup) {
|
|
5163
|
+
this.cleanup = onClickOutside(popper2, () => {
|
|
5164
|
+
state.visible = false;
|
|
5165
|
+
}, {
|
|
5166
|
+
ignore: [triggerRef]
|
|
5167
|
+
});
|
|
5168
|
+
}
|
|
5169
|
+
},
|
|
5170
|
+
invisible() {
|
|
5171
|
+
if (typeof this.cleanup === "function") {
|
|
5172
|
+
this.cleanup();
|
|
5173
|
+
this.cleanup = void 0;
|
|
5174
|
+
}
|
|
5175
|
+
}
|
|
5176
|
+
};
|
|
5177
|
+
const bindPopperTrigger = {
|
|
5178
|
+
target: void 0,
|
|
5179
|
+
visible() {
|
|
5180
|
+
this.target = document.activeElement;
|
|
5181
|
+
},
|
|
5182
|
+
invisible() {
|
|
5183
|
+
var _a2;
|
|
5184
|
+
if (document.activeElement && document.activeElement !== this.target) {
|
|
5185
|
+
(_a2 = this.target) == null ? void 0 : _a2.focus();
|
|
5186
|
+
}
|
|
5187
|
+
this.target = void 0;
|
|
5188
|
+
}
|
|
5189
|
+
};
|
|
5190
|
+
watch(() => state.visible, (visible) => {
|
|
5191
|
+
if (visible) {
|
|
5192
|
+
bindTriggerEleOutsideClick.visible();
|
|
5193
|
+
bindPopperTrigger.visible();
|
|
5194
|
+
state.optionFocusIndex = (state == null ? void 0 : state.selectedOption) ? state == null ? void 0 : state.options.indexOf(state.selectedOption) : -1;
|
|
5195
|
+
setTimeout(() => {
|
|
5196
|
+
var _a2;
|
|
5197
|
+
(_a2 = searchInput.value) == null ? void 0 : _a2.focus();
|
|
5198
|
+
}, 0);
|
|
5199
|
+
} else {
|
|
5200
|
+
bindTriggerEleOutsideClick.invisible();
|
|
5201
|
+
bindPopperTrigger.invisible();
|
|
5202
|
+
state.optionFocusIndex = -1;
|
|
5203
|
+
}
|
|
5204
|
+
});
|
|
5205
|
+
const optionsAllDisabled = computed(() => state.options.filter((option) => option.visible).every((option) => option.disabled));
|
|
5206
|
+
const navigateOptions = (direction) => {
|
|
5207
|
+
if (!state.visible) {
|
|
5208
|
+
state.visible = true;
|
|
5209
|
+
return;
|
|
5210
|
+
}
|
|
5211
|
+
const { length } = state.options;
|
|
5212
|
+
if (length === 0) {
|
|
5213
|
+
return;
|
|
5214
|
+
}
|
|
5215
|
+
if (optionsAllDisabled.value) {
|
|
5216
|
+
return;
|
|
5217
|
+
}
|
|
5218
|
+
if (direction === "next") {
|
|
5219
|
+
state.optionFocusIndex += 1;
|
|
5220
|
+
if (state.optionFocusIndex === length) {
|
|
5221
|
+
state.optionFocusIndex = 0;
|
|
5222
|
+
}
|
|
5223
|
+
} else if (direction === "prev") {
|
|
5224
|
+
state.optionFocusIndex -= 1;
|
|
5225
|
+
if (state.optionFocusIndex < 0) {
|
|
5226
|
+
state.optionFocusIndex = length - 1;
|
|
5227
|
+
}
|
|
5228
|
+
}
|
|
5229
|
+
const option = state.options[state.optionFocusIndex];
|
|
5230
|
+
if (option.disabled || !option.visible) {
|
|
5231
|
+
navigateOptions(direction);
|
|
5232
|
+
}
|
|
5233
|
+
};
|
|
5234
|
+
const handleTargetTrigger = () => {
|
|
5235
|
+
if (state.optionFocusIndex > -1) {
|
|
5236
|
+
onSelect(state == null ? void 0 : state.options[state.optionFocusIndex]);
|
|
5237
|
+
return;
|
|
5238
|
+
}
|
|
5239
|
+
state.visible = !state.visible;
|
|
5240
|
+
};
|
|
5241
|
+
const handleEvent = {
|
|
5242
|
+
searchInput: {
|
|
5243
|
+
keydownEnter() {
|
|
5244
|
+
if (state.optionFocusIndex > -1) {
|
|
5245
|
+
handleTargetTrigger();
|
|
5246
|
+
} else if (state.searchText === "") {
|
|
5247
|
+
state.visible = false;
|
|
5248
|
+
}
|
|
5249
|
+
},
|
|
5250
|
+
keydownEsc() {
|
|
5251
|
+
state.searchText ? onSearchClear : state.visible = false;
|
|
5252
|
+
}
|
|
5253
|
+
}
|
|
5254
|
+
};
|
|
4976
5255
|
return {
|
|
4977
5256
|
popper: popper2,
|
|
5257
|
+
searchInput,
|
|
5258
|
+
triggerRef,
|
|
4978
5259
|
state,
|
|
4979
5260
|
selectClass,
|
|
4980
5261
|
popperClass,
|
|
@@ -4987,31 +5268,22 @@ const _sfc_main$c = defineComponent({
|
|
|
4987
5268
|
onSearchClear,
|
|
4988
5269
|
add,
|
|
4989
5270
|
remove,
|
|
4990
|
-
|
|
5271
|
+
handleTargetTrigger,
|
|
5272
|
+
navigateOptions,
|
|
5273
|
+
handleEvent
|
|
4991
5274
|
};
|
|
4992
5275
|
}
|
|
4993
5276
|
});
|
|
4994
|
-
const _hoisted_1$
|
|
4995
|
-
|
|
4996
|
-
|
|
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 = {
|
|
5277
|
+
const _hoisted_1$8 = { class: "dao-selection-text" };
|
|
5278
|
+
const _hoisted_2$7 = /* @__PURE__ */ createElementVNode("i", { class: "icon-dropdown-line dao-selection-icon" }, null, -1);
|
|
5279
|
+
const _hoisted_3$3 = {
|
|
5008
5280
|
key: 0,
|
|
5009
5281
|
class: "dao-selection-search"
|
|
5010
5282
|
};
|
|
5011
|
-
const
|
|
5012
|
-
const
|
|
5013
|
-
const
|
|
5014
|
-
const
|
|
5283
|
+
const _hoisted_4$2 = ["placeholder"];
|
|
5284
|
+
const _hoisted_5$2 = /* @__PURE__ */ createElementVNode("i", { class: "icon-search dao-selection-search-icon" }, null, -1);
|
|
5285
|
+
const _hoisted_6$1 = { class: "dao-option-list" };
|
|
5286
|
+
const _hoisted_7$1 = {
|
|
5015
5287
|
key: "dao-option-placeholder",
|
|
5016
5288
|
class: "dao-option-placeholder"
|
|
5017
5289
|
};
|
|
@@ -5019,6 +5291,8 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5019
5291
|
const _component_dao_popper = resolveComponent("dao-popper");
|
|
5020
5292
|
return openBlock(), createBlock(_component_dao_popper, {
|
|
5021
5293
|
ref: "popper",
|
|
5294
|
+
modelValue: _ctx.state.visible,
|
|
5295
|
+
"onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => _ctx.state.visible = $event),
|
|
5022
5296
|
delay: 0,
|
|
5023
5297
|
disabled: _ctx.disabled,
|
|
5024
5298
|
offset: _ctx.popperOffset,
|
|
@@ -5028,64 +5302,82 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5028
5302
|
class: normalizeClass(_ctx.selectClass),
|
|
5029
5303
|
"append-to": _ctx.appendTo,
|
|
5030
5304
|
transition: "dao-select",
|
|
5031
|
-
trigger: "
|
|
5305
|
+
trigger: "manual",
|
|
5032
5306
|
placement: "bottom",
|
|
5033
|
-
onHide: _cache[
|
|
5034
|
-
onShow: _cache[
|
|
5307
|
+
onHide: _cache[14] || (_cache[14] = ($event) => _ctx.$emit("close")),
|
|
5308
|
+
onShow: _cache[15] || (_cache[15] = ($event) => _ctx.$emit("open"))
|
|
5035
5309
|
}, {
|
|
5036
5310
|
content: withCtx(() => [
|
|
5037
5311
|
renderSlot(_ctx.$slots, "optionsHeader", {}, () => [
|
|
5038
|
-
_ctx.search ? (openBlock(), createElementBlock("div",
|
|
5312
|
+
_ctx.search ? (openBlock(), createElementBlock("div", _hoisted_3$3, [
|
|
5039
5313
|
withDirectives(createElementVNode("input", {
|
|
5040
5314
|
ref: "searchInput",
|
|
5041
|
-
"onUpdate:modelValue": _cache[
|
|
5315
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => _ctx.state.searchText = $event),
|
|
5042
5316
|
placeholder: _ctx.searchPlaceholder,
|
|
5043
|
-
tabindex: "1",
|
|
5044
5317
|
class: "dao-selection-search-input",
|
|
5045
5318
|
type: "search",
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5319
|
+
onInput: _cache[6] || (_cache[6] = (...args) => _ctx.onSearchTextChange && _ctx.onSearchTextChange(...args)),
|
|
5320
|
+
onKeydown: [
|
|
5321
|
+
_cache[7] || (_cache[7] = withKeys(withModifiers(($event) => _ctx.state.visible = false, ["stop", "prevent"]), ["tab"])),
|
|
5322
|
+
_cache[8] || (_cache[8] = withKeys((...args) => _ctx.handleEvent.searchInput.keydownEsc && _ctx.handleEvent.searchInput.keydownEsc(...args), ["esc"])),
|
|
5323
|
+
_cache[9] || (_cache[9] = withKeys(withModifiers((...args) => _ctx.handleEvent.searchInput.keydownEnter && _ctx.handleEvent.searchInput.keydownEnter(...args), ["stop", "prevent"]), ["enter"])),
|
|
5324
|
+
_cache[10] || (_cache[10] = withKeys(withModifiers(($event) => _ctx.navigateOptions("next"), ["prevent"]), ["down"])),
|
|
5325
|
+
_cache[11] || (_cache[11] = withKeys(withModifiers(($event) => _ctx.navigateOptions("prev"), ["prevent"]), ["up"]))
|
|
5326
|
+
]
|
|
5327
|
+
}, null, 40, _hoisted_4$2), [
|
|
5049
5328
|
[vModelText, _ctx.state.searchText]
|
|
5050
5329
|
]),
|
|
5051
|
-
|
|
5330
|
+
_hoisted_5$2,
|
|
5052
5331
|
withDirectives(createElementVNode("i", {
|
|
5053
5332
|
class: "icon-sys-error dao-selection-search-clear-icon",
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
onClick: _cache[4] || (_cache[4] = (...args) => _ctx.onSearchClear && _ctx.onSearchClear(...args))
|
|
5057
|
-
}, null, 544), [
|
|
5333
|
+
onClick: _cache[12] || (_cache[12] = withModifiers((...args) => _ctx.onSearchClear && _ctx.onSearchClear(...args), ["stop", "prevent"]))
|
|
5334
|
+
}, null, 512), [
|
|
5058
5335
|
[vShow, _ctx.state.searchText]
|
|
5059
5336
|
])
|
|
5060
5337
|
])) : createCommentVNode("", true)
|
|
5061
5338
|
]),
|
|
5062
|
-
createElementVNode("ul",
|
|
5339
|
+
createElementVNode("ul", _hoisted_6$1, [
|
|
5063
5340
|
renderSlot(_ctx.$slots, "default"),
|
|
5064
|
-
_ctx.isNoResult ? (openBlock(), createElementBlock("li",
|
|
5341
|
+
_ctx.isNoResult ? (openBlock(), createElementBlock("li", _hoisted_7$1, toDisplayString(_ctx.optionsPlaceholder), 1)) : createCommentVNode("", true)
|
|
5065
5342
|
])
|
|
5066
5343
|
]),
|
|
5067
5344
|
default: withCtx(() => {
|
|
5068
|
-
var
|
|
5345
|
+
var _a2, _b2;
|
|
5069
5346
|
return [
|
|
5070
|
-
createElementVNode("button",
|
|
5071
|
-
|
|
5347
|
+
createElementVNode("button", {
|
|
5348
|
+
ref: "triggerRef",
|
|
5349
|
+
class: "dao-selection",
|
|
5350
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleTargetTrigger && _ctx.handleTargetTrigger(...args)),
|
|
5351
|
+
onKeydown: [
|
|
5352
|
+
_cache[1] || (_cache[1] = withKeys(withModifiers(($event) => _ctx.state.visible = false, ["stop"]), ["tab"])),
|
|
5353
|
+
_cache[2] || (_cache[2] = withKeys(withModifiers(($event) => _ctx.state.visible = false, ["stop", "prevent"]), ["esc"])),
|
|
5354
|
+
_cache[3] || (_cache[3] = withKeys(withModifiers(($event) => _ctx.navigateOptions("next"), ["prevent"]), ["down"])),
|
|
5355
|
+
_cache[4] || (_cache[4] = withKeys(withModifiers(($event) => _ctx.navigateOptions("prev"), ["prevent"]), ["up"]))
|
|
5356
|
+
]
|
|
5357
|
+
}, [
|
|
5358
|
+
withDirectives(createElementVNode("span", _hoisted_1$8, [
|
|
5072
5359
|
renderSlot(_ctx.$slots, "selected", {
|
|
5073
|
-
selectedLabel: (
|
|
5360
|
+
selectedLabel: (_a2 = _ctx.state.selectedOption) == null ? void 0 : _a2.label,
|
|
5074
5361
|
selectedOption: _ctx.state.selectedOption,
|
|
5075
|
-
selectedValue: (
|
|
5362
|
+
selectedValue: (_b2 = _ctx.state.selectedOption) == null ? void 0 : _b2.value
|
|
5076
5363
|
}, () => {
|
|
5077
|
-
var
|
|
5364
|
+
var _a3;
|
|
5078
5365
|
return [
|
|
5079
|
-
createTextVNode(toDisplayString((
|
|
5366
|
+
createTextVNode(toDisplayString((_a3 = _ctx.state.selectedOption) == null ? void 0 : _a3.labelValue), 1)
|
|
5080
5367
|
];
|
|
5081
5368
|
})
|
|
5082
|
-
]
|
|
5083
|
-
|
|
5084
|
-
|
|
5369
|
+
], 512), [
|
|
5370
|
+
[vShow, _ctx.isSelected]
|
|
5371
|
+
]),
|
|
5372
|
+
withDirectives(createElementVNode("span", { class: "dao-selection-text--placeholder" }, toDisplayString(_ctx.placeholder), 513), [
|
|
5373
|
+
[vShow, !_ctx.isSelected]
|
|
5374
|
+
]),
|
|
5375
|
+
_hoisted_2$7
|
|
5376
|
+
], 544)
|
|
5085
5377
|
];
|
|
5086
5378
|
}),
|
|
5087
5379
|
_: 3
|
|
5088
|
-
}, 8, ["disabled", "offset", "popper-class", "popper-options", "class", "append-to"]);
|
|
5380
|
+
}, 8, ["modelValue", "disabled", "offset", "popper-class", "popper-options", "class", "append-to"]);
|
|
5089
5381
|
}
|
|
5090
5382
|
var DaoSelect = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$a]]);
|
|
5091
5383
|
var option_vue_vue_type_style_index_0_lang = "";
|
|
@@ -5106,10 +5398,12 @@ const _sfc_main$b = defineComponent({
|
|
|
5106
5398
|
}
|
|
5107
5399
|
},
|
|
5108
5400
|
setup(props) {
|
|
5401
|
+
const optionRef = ref(null);
|
|
5109
5402
|
const addFn = inject("add");
|
|
5110
5403
|
const onSelectFn = inject("onSelect");
|
|
5111
5404
|
const removeFn = inject("remove");
|
|
5112
5405
|
const selectState = inject("selectState");
|
|
5406
|
+
const { label, disabled, value } = toRefs(props);
|
|
5113
5407
|
const labelValue = computed(() => {
|
|
5114
5408
|
if (props.label === null || props.label === void 0) {
|
|
5115
5409
|
return props.value;
|
|
@@ -5117,9 +5411,10 @@ const _sfc_main$b = defineComponent({
|
|
|
5117
5411
|
return props.label;
|
|
5118
5412
|
});
|
|
5119
5413
|
const instance = reactive({
|
|
5120
|
-
label
|
|
5121
|
-
value
|
|
5122
|
-
|
|
5414
|
+
label,
|
|
5415
|
+
value,
|
|
5416
|
+
disabled,
|
|
5417
|
+
labelValue,
|
|
5123
5418
|
visible: true,
|
|
5124
5419
|
setVisible(val) {
|
|
5125
5420
|
instance.visible = val;
|
|
@@ -5127,8 +5422,21 @@ const _sfc_main$b = defineComponent({
|
|
|
5127
5422
|
});
|
|
5128
5423
|
const visible = computed(() => instance.visible);
|
|
5129
5424
|
const isSelected = computed(() => {
|
|
5130
|
-
var
|
|
5131
|
-
return ((
|
|
5425
|
+
var _a2;
|
|
5426
|
+
return ((_a2 = selectState == null ? void 0 : selectState.selectedOption) == null ? void 0 : _a2.value) === instance.value;
|
|
5427
|
+
});
|
|
5428
|
+
const isFocus = computed(() => {
|
|
5429
|
+
var _a2, _b2;
|
|
5430
|
+
const index2 = (_b2 = (_a2 = selectState == null ? void 0 : selectState.options) == null ? void 0 : _a2.indexOf(instance)) != null ? _b2 : -1;
|
|
5431
|
+
return index2 === (selectState == null ? void 0 : selectState.optionFocusIndex);
|
|
5432
|
+
});
|
|
5433
|
+
watch(isFocus, (val) => {
|
|
5434
|
+
nextTick(() => {
|
|
5435
|
+
if (val) {
|
|
5436
|
+
const el = optionRef.value;
|
|
5437
|
+
(el == null ? void 0 : el.scrollIntoViewIfNeeded) && (el == null ? void 0 : el.scrollIntoViewIfNeeded(false)) || (el == null ? void 0 : el.scrollIntoView) && el.scrollIntoView(false);
|
|
5438
|
+
}
|
|
5439
|
+
});
|
|
5132
5440
|
});
|
|
5133
5441
|
const onClick = () => {
|
|
5134
5442
|
if (!props.disabled && typeof onSelectFn === "function") {
|
|
@@ -5139,31 +5447,35 @@ const _sfc_main$b = defineComponent({
|
|
|
5139
5447
|
addFn(instance);
|
|
5140
5448
|
}
|
|
5141
5449
|
onBeforeUnmount(() => {
|
|
5142
|
-
var
|
|
5450
|
+
var _a2;
|
|
5143
5451
|
if (typeof removeFn === "function") {
|
|
5144
|
-
const index2 = (
|
|
5452
|
+
const index2 = (_a2 = selectState == null ? void 0 : selectState.options.indexOf(instance)) != null ? _a2 : -1;
|
|
5145
5453
|
removeFn(index2);
|
|
5146
5454
|
}
|
|
5147
5455
|
});
|
|
5148
5456
|
return {
|
|
5457
|
+
optionRef,
|
|
5149
5458
|
visible,
|
|
5150
5459
|
labelValue,
|
|
5151
5460
|
isSelected,
|
|
5461
|
+
isFocus,
|
|
5152
5462
|
onClick
|
|
5153
5463
|
};
|
|
5154
5464
|
}
|
|
5155
5465
|
});
|
|
5156
|
-
const _hoisted_1$
|
|
5466
|
+
const _hoisted_1$7 = ["title"];
|
|
5157
5467
|
const _hoisted_2$6 = {
|
|
5158
5468
|
key: 0,
|
|
5159
5469
|
class: "icon-checked dao-option-checkmark"
|
|
5160
5470
|
};
|
|
5161
5471
|
function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5162
5472
|
return withDirectives((openBlock(), createElementBlock("li", {
|
|
5473
|
+
ref: "optionRef",
|
|
5163
5474
|
class: normalizeClass([
|
|
5164
5475
|
"dao-option",
|
|
5165
5476
|
{
|
|
5166
5477
|
"dao-option-active": _ctx.isSelected,
|
|
5478
|
+
"dao-option--focus": _ctx.isFocus,
|
|
5167
5479
|
"dao-option-disabled": _ctx.disabled
|
|
5168
5480
|
}
|
|
5169
5481
|
]),
|
|
@@ -5175,7 +5487,7 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5175
5487
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
5176
5488
|
createTextVNode(toDisplayString(_ctx.labelValue), 1)
|
|
5177
5489
|
])
|
|
5178
|
-
], 8, _hoisted_1$
|
|
5490
|
+
], 8, _hoisted_1$7),
|
|
5179
5491
|
_ctx.isSelected ? (openBlock(), createElementBlock("i", _hoisted_2$6)) : createCommentVNode("", true)
|
|
5180
5492
|
], 2)), [
|
|
5181
5493
|
[vShow, _ctx.visible]
|
|
@@ -5217,6 +5529,16 @@ const _sfc_main$a = defineComponent({
|
|
|
5217
5529
|
}
|
|
5218
5530
|
return [...filteredPageSizeOptions, props.pageSize].sort(numberAscSort);
|
|
5219
5531
|
});
|
|
5532
|
+
const computedLayout = computed(() => {
|
|
5533
|
+
if (!props.layout || props.layout.length === 0) {
|
|
5534
|
+
return { show: false };
|
|
5535
|
+
}
|
|
5536
|
+
const res = { show: true };
|
|
5537
|
+
props.layout.forEach((key) => {
|
|
5538
|
+
res[key] = true;
|
|
5539
|
+
});
|
|
5540
|
+
return res;
|
|
5541
|
+
});
|
|
5220
5542
|
const prevPage = () => {
|
|
5221
5543
|
if (currentPage.value === 1) {
|
|
5222
5544
|
return;
|
|
@@ -5246,13 +5568,11 @@ const _sfc_main$a = defineComponent({
|
|
|
5246
5568
|
emit("update:current-page", value);
|
|
5247
5569
|
emit("page-change", value);
|
|
5248
5570
|
};
|
|
5249
|
-
watch(currentPage, (
|
|
5250
|
-
currentShowPage.value =
|
|
5251
|
-
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
currentShowPage.value = val;
|
|
5255
|
-
emit("update:current-page", val);
|
|
5571
|
+
watch([currentPage, totalPage], () => {
|
|
5572
|
+
currentShowPage.value = props.currentPage;
|
|
5573
|
+
if (currentShowPage.value > totalPage.value) {
|
|
5574
|
+
currentShowPage.value = totalPage.value;
|
|
5575
|
+
emit("update:current-page", totalPage.value);
|
|
5256
5576
|
}
|
|
5257
5577
|
});
|
|
5258
5578
|
const updatePageSize = (val) => {
|
|
@@ -5271,6 +5591,7 @@ const _sfc_main$a = defineComponent({
|
|
|
5271
5591
|
totalText,
|
|
5272
5592
|
totalPage,
|
|
5273
5593
|
computedPageSizeOptions,
|
|
5594
|
+
computedLayout,
|
|
5274
5595
|
prevPage,
|
|
5275
5596
|
nextPage,
|
|
5276
5597
|
targetPage,
|
|
@@ -5279,47 +5600,50 @@ const _sfc_main$a = defineComponent({
|
|
|
5279
5600
|
};
|
|
5280
5601
|
}
|
|
5281
5602
|
});
|
|
5282
|
-
const _hoisted_1$
|
|
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" };
|
|
5603
|
+
const _hoisted_1$6 = ["disabled"];
|
|
5604
|
+
const _hoisted_2$5 = { class: "dao-pagination__pager-total" };
|
|
5286
5605
|
function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5287
5606
|
const _component_dao_option = resolveComponent("dao-option");
|
|
5288
5607
|
const _component_dao_select = resolveComponent("dao-select");
|
|
5289
|
-
return openBlock(), createElementBlock("div", {
|
|
5608
|
+
return _ctx.computedLayout.show ? (openBlock(), createElementBlock("div", {
|
|
5609
|
+
key: 0,
|
|
5290
5610
|
class: normalizeClass(["dao-pagination", { "dao-pagination--compact": _ctx.compact }])
|
|
5291
5611
|
}, [
|
|
5292
|
-
createElementVNode("div",
|
|
5293
|
-
|
|
5612
|
+
createElementVNode("div", {
|
|
5613
|
+
class: normalizeClass(["dao-pagination__total", { "is-invisible": !_ctx.computedLayout.total }])
|
|
5614
|
+
}, toDisplayString(_ctx.totalText), 3),
|
|
5615
|
+
createElementVNode("div", {
|
|
5616
|
+
class: normalizeClass(["dao-pagination__pager", { "is-invisible": !_ctx.computedLayout.pager }])
|
|
5617
|
+
}, [
|
|
5294
5618
|
createElementVNode("i", {
|
|
5295
5619
|
class: normalizeClass([
|
|
5296
5620
|
"icon-arrow-previous",
|
|
5297
5621
|
"dao-pagination__pager-prev",
|
|
5298
|
-
{ "dao-pagination__pager-icon--disabled": _ctx.currentPage
|
|
5622
|
+
{ "dao-pagination__pager-icon--disabled": _ctx.currentPage <= 1 }
|
|
5299
5623
|
]),
|
|
5300
5624
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.prevPage && _ctx.prevPage(...args))
|
|
5301
5625
|
}, null, 2),
|
|
5302
5626
|
withDirectives(createElementVNode("input", {
|
|
5303
5627
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.currentShowPage = $event),
|
|
5304
5628
|
class: "dao-pagination__pager-current",
|
|
5305
|
-
disabled: _ctx.totalPage
|
|
5629
|
+
disabled: _ctx.totalPage <= 1,
|
|
5306
5630
|
onKeydown: _cache[2] || (_cache[2] = withKeys((...args) => _ctx.targetPage && _ctx.targetPage(...args), ["enter"])),
|
|
5307
5631
|
onInput: _cache[3] || (_cache[3] = (...args) => _ctx.currentShowPageFormat && _ctx.currentShowPageFormat(...args))
|
|
5308
|
-
}, null, 40,
|
|
5632
|
+
}, null, 40, _hoisted_1$6), [
|
|
5309
5633
|
[vModelText, _ctx.currentShowPage]
|
|
5310
5634
|
]),
|
|
5311
|
-
createElementVNode("span",
|
|
5635
|
+
createElementVNode("span", _hoisted_2$5, " / " + toDisplayString(_ctx.totalPage), 1),
|
|
5312
5636
|
createElementVNode("i", {
|
|
5313
5637
|
class: normalizeClass([
|
|
5314
5638
|
"icon-arrow-next",
|
|
5315
5639
|
"dao-pagination__pager-next",
|
|
5316
|
-
{ "dao-pagination__pager-icon--disabled": _ctx.currentPage
|
|
5640
|
+
{ "dao-pagination__pager-icon--disabled": _ctx.currentPage >= _ctx.totalPage }
|
|
5317
5641
|
]),
|
|
5318
5642
|
onClick: _cache[4] || (_cache[4] = (...args) => _ctx.nextPage && _ctx.nextPage(...args))
|
|
5319
5643
|
}, null, 2)
|
|
5320
|
-
]),
|
|
5644
|
+
], 2),
|
|
5321
5645
|
createVNode(_component_dao_select, {
|
|
5322
|
-
class: "dao-pagination__sizer",
|
|
5646
|
+
class: normalizeClass(["dao-pagination__sizer", { "is-invisible": !_ctx.computedLayout.sizer }]),
|
|
5323
5647
|
"model-value": _ctx.pageSize,
|
|
5324
5648
|
size: "sm",
|
|
5325
5649
|
style: normalizeStyle({ width: `${_ctx.pageSizerWidth}px` }),
|
|
@@ -5336,8 +5660,8 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5336
5660
|
}), 128))
|
|
5337
5661
|
]),
|
|
5338
5662
|
_: 1
|
|
5339
|
-
}, 8, ["model-value", "style", "onChange"])
|
|
5340
|
-
], 2);
|
|
5663
|
+
}, 8, ["class", "model-value", "style", "onChange"])
|
|
5664
|
+
], 2)) : createCommentVNode("", true);
|
|
5341
5665
|
}
|
|
5342
5666
|
var DaoPagination = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$8]]);
|
|
5343
5667
|
var popover_scss_vue_type_style_index_0_src_lang = "";
|
|
@@ -5396,7 +5720,7 @@ const _sfc_main$8 = defineComponent({
|
|
|
5396
5720
|
};
|
|
5397
5721
|
}
|
|
5398
5722
|
});
|
|
5399
|
-
const _hoisted_1$
|
|
5723
|
+
const _hoisted_1$5 = { class: "dao-progress" };
|
|
5400
5724
|
const _hoisted_2$4 = {
|
|
5401
5725
|
key: 1,
|
|
5402
5726
|
class: "dao-progress__stacked"
|
|
@@ -5406,7 +5730,7 @@ const _hoisted_3$2 = {
|
|
|
5406
5730
|
class: "dao-progress__text"
|
|
5407
5731
|
};
|
|
5408
5732
|
function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5409
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
5733
|
+
return openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
5410
5734
|
createElementVNode("div", {
|
|
5411
5735
|
class: "dao-progress__inner",
|
|
5412
5736
|
style: normalizeStyle({ background: _ctx.bgColor })
|
|
@@ -5502,7 +5826,7 @@ const _sfc_main$7 = defineComponent({
|
|
|
5502
5826
|
};
|
|
5503
5827
|
}
|
|
5504
5828
|
});
|
|
5505
|
-
const _hoisted_1$
|
|
5829
|
+
const _hoisted_1$4 = ["disabled", "name", "checked"];
|
|
5506
5830
|
const _hoisted_2$3 = /* @__PURE__ */ createElementVNode("span", { class: "dao-radio-inner" }, null, -1);
|
|
5507
5831
|
const _hoisted_3$1 = {
|
|
5508
5832
|
key: 0,
|
|
@@ -5530,7 +5854,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5530
5854
|
name: _ctx.name,
|
|
5531
5855
|
checked: _ctx.currentValue,
|
|
5532
5856
|
onChange: _cache[0] || (_cache[0] = (...args) => _ctx.change && _ctx.change(...args))
|
|
5533
|
-
}, null, 40, _hoisted_1$
|
|
5857
|
+
}, null, 40, _hoisted_1$4),
|
|
5534
5858
|
_hoisted_2$3
|
|
5535
5859
|
], 2),
|
|
5536
5860
|
_ctx.$slots.default || _ctx.label || _ctx.$slots.helper ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
|
|
@@ -5645,7 +5969,7 @@ const _sfc_main$5 = defineComponent({
|
|
|
5645
5969
|
};
|
|
5646
5970
|
}
|
|
5647
5971
|
});
|
|
5648
|
-
const _hoisted_1$
|
|
5972
|
+
const _hoisted_1$3 = ["value", "name", "disabled"];
|
|
5649
5973
|
const _hoisted_2$2 = {
|
|
5650
5974
|
key: 0,
|
|
5651
5975
|
class: "dao-switch__label"
|
|
@@ -5661,7 +5985,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5661
5985
|
value: _ctx.currentValue,
|
|
5662
5986
|
name: _ctx.name,
|
|
5663
5987
|
disabled: _ctx.disabled
|
|
5664
|
-
}, null, 8, _hoisted_1$
|
|
5988
|
+
}, null, 8, _hoisted_1$3),
|
|
5665
5989
|
createElementVNode("span", {
|
|
5666
5990
|
class: normalizeClass(["dao-switch__pill", { "dao-switch-checked": _ctx.currentValue }])
|
|
5667
5991
|
}, null, 2),
|
|
@@ -5717,9 +6041,9 @@ const _sfc_main$4 = defineComponent({
|
|
|
5717
6041
|
};
|
|
5718
6042
|
}
|
|
5719
6043
|
});
|
|
5720
|
-
const _hoisted_1$
|
|
6044
|
+
const _hoisted_1$2 = { class: "dao-table-resizer-separator" };
|
|
5721
6045
|
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5722
|
-
return openBlock(), createElementBlock("span", _hoisted_1$
|
|
6046
|
+
return openBlock(), createElementBlock("span", _hoisted_1$2, [
|
|
5723
6047
|
!_ctx.disabled ? (openBlock(), createElementBlock("span", {
|
|
5724
6048
|
key: 0,
|
|
5725
6049
|
class: "dao-table-resizer-handle",
|
|
@@ -5791,7 +6115,16 @@ const tableProps = {
|
|
|
5791
6115
|
pageSizerWidth: {
|
|
5792
6116
|
type: Number,
|
|
5793
6117
|
default: 110
|
|
5794
|
-
}
|
|
6118
|
+
},
|
|
6119
|
+
emptyText: {
|
|
6120
|
+
type: String,
|
|
6121
|
+
default: "\u6682\u65E0\u6570\u636E"
|
|
6122
|
+
},
|
|
6123
|
+
noShadow: {
|
|
6124
|
+
type: Boolean,
|
|
6125
|
+
default: false
|
|
6126
|
+
},
|
|
6127
|
+
pageLayout: paginationProps.layout
|
|
5795
6128
|
};
|
|
5796
6129
|
var table_vue_vue_type_style_index_0_lang = "";
|
|
5797
6130
|
const positiveIntegerNumberReg = /^[1-9]\d*$/;
|
|
@@ -5834,10 +6167,24 @@ const _sfc_main$3 = defineComponent({
|
|
|
5834
6167
|
const expandedRows = reactive(new WeakSet());
|
|
5835
6168
|
const columnRefs = reactive({});
|
|
5836
6169
|
const columns = reactive([]);
|
|
5837
|
-
const currentPage =
|
|
5838
|
-
|
|
6170
|
+
const currentPage = computed({
|
|
6171
|
+
get() {
|
|
6172
|
+
return props.currentPage;
|
|
6173
|
+
},
|
|
6174
|
+
set(value) {
|
|
6175
|
+
emit("update:current-page", value);
|
|
6176
|
+
}
|
|
6177
|
+
});
|
|
6178
|
+
const pageSize = computed({
|
|
6179
|
+
get() {
|
|
6180
|
+
return props.pageSize;
|
|
6181
|
+
},
|
|
6182
|
+
set(value) {
|
|
6183
|
+
emit("update:page-size", value);
|
|
6184
|
+
}
|
|
6185
|
+
});
|
|
5839
6186
|
const tableScroll = ref();
|
|
5840
|
-
const
|
|
6187
|
+
const global2 = reactive({
|
|
5841
6188
|
checked: false,
|
|
5842
6189
|
indeterminate: false
|
|
5843
6190
|
});
|
|
@@ -5863,8 +6210,8 @@ const _sfc_main$3 = defineComponent({
|
|
|
5863
6210
|
watch(tableSetting, (val) => {
|
|
5864
6211
|
setTableSetting(val);
|
|
5865
6212
|
});
|
|
5866
|
-
function formatDefaultTableSetting() {
|
|
5867
|
-
return
|
|
6213
|
+
function formatDefaultTableSetting(tempColumns) {
|
|
6214
|
+
return tempColumns.reduce((prev, current) => {
|
|
5868
6215
|
const preValue = prev;
|
|
5869
6216
|
preValue[current.id] = {
|
|
5870
6217
|
width: current.defaultWidth,
|
|
@@ -5874,16 +6221,16 @@ const _sfc_main$3 = defineComponent({
|
|
|
5874
6221
|
}, {});
|
|
5875
6222
|
}
|
|
5876
6223
|
const init = () => {
|
|
5877
|
-
|
|
6224
|
+
const tempColumns = [];
|
|
5878
6225
|
props.columns.forEach((column) => {
|
|
5879
|
-
|
|
6226
|
+
tempColumns.push(__spreadValues(__spreadValues({}, defaultColumnConfig), column));
|
|
5880
6227
|
});
|
|
5881
6228
|
const storedTableSetting = getTableSetting();
|
|
5882
|
-
const defaultTableSetting = formatDefaultTableSetting();
|
|
6229
|
+
const defaultTableSetting = formatDefaultTableSetting(tempColumns);
|
|
5883
6230
|
if (!storedTableSetting) {
|
|
5884
6231
|
Object.assign(tableSetting, defaultTableSetting);
|
|
5885
6232
|
} else {
|
|
5886
|
-
|
|
6233
|
+
tempColumns.forEach((column) => {
|
|
5887
6234
|
const { id } = column;
|
|
5888
6235
|
if (!storedTableSetting[id]) {
|
|
5889
6236
|
tableSetting[id] = {
|
|
@@ -5900,6 +6247,7 @@ const _sfc_main$3 = defineComponent({
|
|
|
5900
6247
|
}
|
|
5901
6248
|
});
|
|
5902
6249
|
}
|
|
6250
|
+
columns.splice(0, columns.length, ...tempColumns);
|
|
5903
6251
|
};
|
|
5904
6252
|
const columnStyle = (id) => {
|
|
5905
6253
|
const setting = tableSetting[id];
|
|
@@ -5923,6 +6271,7 @@ const _sfc_main$3 = defineComponent({
|
|
|
5923
6271
|
}
|
|
5924
6272
|
return classes;
|
|
5925
6273
|
});
|
|
6274
|
+
const isEmpty = computed(() => (props.data || []).length === 0);
|
|
5926
6275
|
const sortColumn = (column) => {
|
|
5927
6276
|
if (!column.sortable) {
|
|
5928
6277
|
return;
|
|
@@ -5964,7 +6313,7 @@ const _sfc_main$3 = defineComponent({
|
|
|
5964
6313
|
}
|
|
5965
6314
|
};
|
|
5966
6315
|
const toggleSelectedAll = () => {
|
|
5967
|
-
if (
|
|
6316
|
+
if (global2.checked) {
|
|
5968
6317
|
selectedRows.clear();
|
|
5969
6318
|
emit("select", []);
|
|
5970
6319
|
} else {
|
|
@@ -5992,16 +6341,9 @@ const _sfc_main$3 = defineComponent({
|
|
|
5992
6341
|
clearExpansion();
|
|
5993
6342
|
clearSelection();
|
|
5994
6343
|
};
|
|
5995
|
-
init();
|
|
5996
6344
|
watch(() => props.columns, () => {
|
|
5997
6345
|
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
|
-
});
|
|
6346
|
+
}, { deep: true, immediate: true });
|
|
6005
6347
|
watchEffect(() => {
|
|
6006
6348
|
let have = 0;
|
|
6007
6349
|
let notHave = 0;
|
|
@@ -6017,14 +6359,14 @@ const _sfc_main$3 = defineComponent({
|
|
|
6017
6359
|
}
|
|
6018
6360
|
}
|
|
6019
6361
|
if (have && notHave) {
|
|
6020
|
-
|
|
6021
|
-
|
|
6362
|
+
global2.checked = false;
|
|
6363
|
+
global2.indeterminate = true;
|
|
6022
6364
|
} else if (have) {
|
|
6023
|
-
|
|
6024
|
-
|
|
6365
|
+
global2.checked = true;
|
|
6366
|
+
global2.indeterminate = false;
|
|
6025
6367
|
} else {
|
|
6026
|
-
|
|
6027
|
-
|
|
6368
|
+
global2.checked = false;
|
|
6369
|
+
global2.indeterminate = false;
|
|
6028
6370
|
}
|
|
6029
6371
|
});
|
|
6030
6372
|
const isEllipsis = () => {
|
|
@@ -6073,66 +6415,72 @@ const _sfc_main$3 = defineComponent({
|
|
|
6073
6415
|
currentPage,
|
|
6074
6416
|
pageSize,
|
|
6075
6417
|
clearState,
|
|
6076
|
-
global,
|
|
6418
|
+
global: global2,
|
|
6077
6419
|
tableScroll,
|
|
6078
6420
|
expandedRows,
|
|
6079
|
-
onRowClick
|
|
6421
|
+
onRowClick,
|
|
6422
|
+
isEmpty
|
|
6080
6423
|
};
|
|
6081
6424
|
}
|
|
6082
6425
|
});
|
|
6083
|
-
const _hoisted_1$
|
|
6084
|
-
const _hoisted_2$1 = {
|
|
6085
|
-
const _hoisted_3 = {
|
|
6426
|
+
const _hoisted_1$1 = { class: "dao-table" };
|
|
6427
|
+
const _hoisted_2$1 = {
|
|
6086
6428
|
key: 0,
|
|
6087
6429
|
class: "dao-table-thead"
|
|
6088
6430
|
};
|
|
6089
|
-
const
|
|
6090
|
-
const
|
|
6431
|
+
const _hoisted_3 = { class: "dao-table-tr" };
|
|
6432
|
+
const _hoisted_4 = {
|
|
6091
6433
|
key: 0,
|
|
6092
6434
|
class: "dao-table-th"
|
|
6093
6435
|
};
|
|
6094
|
-
const
|
|
6436
|
+
const _hoisted_5 = {
|
|
6095
6437
|
key: 1,
|
|
6096
6438
|
class: "dao-table-th dao-table-th--expandable"
|
|
6097
6439
|
};
|
|
6098
|
-
const
|
|
6099
|
-
const
|
|
6100
|
-
const
|
|
6101
|
-
const
|
|
6102
|
-
const
|
|
6440
|
+
const _hoisted_6 = ["onClick"];
|
|
6441
|
+
const _hoisted_7 = { class: "dao-table-th__content" };
|
|
6442
|
+
const _hoisted_8 = { class: "dao-table-tbody" };
|
|
6443
|
+
const _hoisted_9 = ["onClick"];
|
|
6444
|
+
const _hoisted_10 = {
|
|
6103
6445
|
key: 0,
|
|
6104
6446
|
class: "dao-table-td"
|
|
6105
6447
|
};
|
|
6106
|
-
const
|
|
6448
|
+
const _hoisted_11 = {
|
|
6107
6449
|
key: 1,
|
|
6108
6450
|
class: "dao-table-td"
|
|
6109
6451
|
};
|
|
6110
|
-
const
|
|
6111
|
-
const
|
|
6452
|
+
const _hoisted_12 = ["onClick"];
|
|
6453
|
+
const _hoisted_13 = {
|
|
6112
6454
|
key: 0,
|
|
6113
6455
|
class: "dao-table-tr-expand"
|
|
6114
6456
|
};
|
|
6457
|
+
const _hoisted_14 = {
|
|
6458
|
+
key: 0,
|
|
6459
|
+
class: "dao-table__empty-block"
|
|
6460
|
+
};
|
|
6115
6461
|
const _hoisted_15 = { class: "dao-table-pagination" };
|
|
6116
6462
|
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6117
6463
|
const _component_dao_checkbox = resolveComponent("dao-checkbox");
|
|
6118
6464
|
const _component_dao_resizer = resolveComponent("dao-resizer");
|
|
6119
6465
|
const _component_dao_pagination = resolveComponent("dao-pagination");
|
|
6120
|
-
return openBlock(), createElementBlock("div",
|
|
6466
|
+
return openBlock(), createElementBlock("div", {
|
|
6467
|
+
class: normalizeClass(["dao-table-container", { "dao-table-container--with-shadow": !_ctx.noShadow }])
|
|
6468
|
+
}, [
|
|
6121
6469
|
createElementVNode("div", {
|
|
6122
6470
|
ref: "tableScroll",
|
|
6123
6471
|
class: normalizeClass(["dao-table-scroll", _ctx.tableWrapperClasses])
|
|
6124
6472
|
}, [
|
|
6125
|
-
createElementVNode("table",
|
|
6126
|
-
_ctx.showHeader ? (openBlock(), createElementBlock("thead",
|
|
6127
|
-
createElementVNode("tr",
|
|
6128
|
-
_ctx.selectable ? (openBlock(), createElementBlock("th",
|
|
6473
|
+
createElementVNode("table", _hoisted_1$1, [
|
|
6474
|
+
_ctx.showHeader ? (openBlock(), createElementBlock("thead", _hoisted_2$1, [
|
|
6475
|
+
createElementVNode("tr", _hoisted_3, [
|
|
6476
|
+
_ctx.selectable ? (openBlock(), createElementBlock("th", _hoisted_4, [
|
|
6129
6477
|
createVNode(_component_dao_checkbox, {
|
|
6130
6478
|
checked: _ctx.global.checked,
|
|
6131
6479
|
indeterminate: _ctx.global.indeterminate,
|
|
6132
6480
|
onChange: _ctx.toggleSelectedAll
|
|
6133
6481
|
}, null, 8, ["checked", "indeterminate", "onChange"])
|
|
6134
6482
|
])) : createCommentVNode("", true),
|
|
6135
|
-
_ctx.expandable ? (openBlock(), createElementBlock("th",
|
|
6483
|
+
_ctx.expandable ? (openBlock(), createElementBlock("th", _hoisted_5)) : createCommentVNode("", true),
|
|
6136
6484
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.filterColumns, (column) => {
|
|
6137
6485
|
return openBlock(), createElementBlock("th", {
|
|
6138
6486
|
key: column.id,
|
|
@@ -6141,7 +6489,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6141
6489
|
style: normalizeStyle(_ctx.columnStyle(column.id)),
|
|
6142
6490
|
onClick: ($event) => _ctx.sortColumn(column)
|
|
6143
6491
|
}, [
|
|
6144
|
-
createElementVNode("span",
|
|
6492
|
+
createElementVNode("span", _hoisted_7, [
|
|
6145
6493
|
renderSlot(_ctx.$slots, `th-${column.id}`, {}, () => [
|
|
6146
6494
|
createTextVNode(toDisplayString(column.header), 1)
|
|
6147
6495
|
])
|
|
@@ -6160,28 +6508,28 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6160
6508
|
onUpdateColumnWidth: ($event) => _ctx.updateColumnWidth($event, column.id),
|
|
6161
6509
|
onAfterResize: ($event) => _ctx.$emit("afterResize", column.id)
|
|
6162
6510
|
}, null, 8, ["disabled", "setting", "column", "onFixedColumnWidth", "onUpdateColumnWidth", "onAfterResize"])
|
|
6163
|
-
], 14,
|
|
6511
|
+
], 14, _hoisted_6);
|
|
6164
6512
|
}), 128))
|
|
6165
6513
|
])
|
|
6166
6514
|
])) : createCommentVNode("", true),
|
|
6167
|
-
createElementVNode("tbody",
|
|
6515
|
+
createElementVNode("tbody", _hoisted_8, [
|
|
6168
6516
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.data, (row, index2) => {
|
|
6169
6517
|
return openBlock(), createElementBlock(Fragment, { key: index2 }, [
|
|
6170
6518
|
createElementVNode("tr", {
|
|
6171
6519
|
class: normalizeClass(["dao-table-tr", { "dao-table-tr--expandable-open": _ctx.expandable && _ctx.isRowExpanded(row) }]),
|
|
6172
6520
|
onClick: ($event) => _ctx.onRowClick(row, index2)
|
|
6173
6521
|
}, [
|
|
6174
|
-
_ctx.selectable ? (openBlock(), createElementBlock("td",
|
|
6522
|
+
_ctx.selectable ? (openBlock(), createElementBlock("td", _hoisted_10, [
|
|
6175
6523
|
createVNode(_component_dao_checkbox, {
|
|
6176
6524
|
checked: _ctx.isRowSelected(row),
|
|
6177
6525
|
onChange: ($event) => _ctx.toggleSelected(row)
|
|
6178
6526
|
}, null, 8, ["checked", "onChange"])
|
|
6179
6527
|
])) : createCommentVNode("", true),
|
|
6180
|
-
_ctx.expandable ? (openBlock(), createElementBlock("td",
|
|
6528
|
+
_ctx.expandable ? (openBlock(), createElementBlock("td", _hoisted_11, [
|
|
6181
6529
|
createElementVNode("i", {
|
|
6182
6530
|
class: "dao-table-expand-toggle icon-arrow-sharp",
|
|
6183
6531
|
onClick: ($event) => _ctx.toggleExpand(row, index2)
|
|
6184
|
-
}, null, 8,
|
|
6532
|
+
}, null, 8, _hoisted_12)
|
|
6185
6533
|
])) : createCommentVNode("", true),
|
|
6186
6534
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.filterColumns, (column) => {
|
|
6187
6535
|
return openBlock(), createElementBlock("td", {
|
|
@@ -6198,8 +6546,8 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6198
6546
|
])
|
|
6199
6547
|
], 4);
|
|
6200
6548
|
}), 128))
|
|
6201
|
-
], 10,
|
|
6202
|
-
_ctx.expandable && _ctx.expandedRows.has(row) ? withDirectives((openBlock(), createElementBlock("tr",
|
|
6549
|
+
], 10, _hoisted_9),
|
|
6550
|
+
_ctx.expandable && _ctx.expandedRows.has(row) ? withDirectives((openBlock(), createElementBlock("tr", _hoisted_13, [
|
|
6203
6551
|
renderSlot(_ctx.$slots, "expand", {
|
|
6204
6552
|
row,
|
|
6205
6553
|
rowIndex: index2
|
|
@@ -6208,43 +6556,53 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6208
6556
|
[vShow, _ctx.isRowExpanded(row)]
|
|
6209
6557
|
]) : createCommentVNode("", true)
|
|
6210
6558
|
], 64);
|
|
6211
|
-
}), 128))
|
|
6559
|
+
}), 128)),
|
|
6560
|
+
_ctx.isEmpty ? (openBlock(), createElementBlock("div", _hoisted_14, [
|
|
6561
|
+
renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
6562
|
+
createTextVNode(toDisplayString(_ctx.emptyText), 1)
|
|
6563
|
+
])
|
|
6564
|
+
])) : createCommentVNode("", true)
|
|
6212
6565
|
])
|
|
6213
6566
|
])
|
|
6214
6567
|
], 2),
|
|
6215
6568
|
createElementVNode("div", _hoisted_15, [
|
|
6216
|
-
renderSlot(_ctx.$slots, "pagination", {}, () =>
|
|
6217
|
-
|
|
6218
|
-
|
|
6219
|
-
|
|
6220
|
-
|
|
6221
|
-
|
|
6222
|
-
|
|
6223
|
-
|
|
6224
|
-
|
|
6225
|
-
|
|
6226
|
-
|
|
6227
|
-
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
_ctx.
|
|
6231
|
-
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
-
|
|
6236
|
-
|
|
6237
|
-
|
|
6238
|
-
|
|
6239
|
-
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
|
|
6244
|
-
|
|
6245
|
-
|
|
6569
|
+
renderSlot(_ctx.$slots, "pagination", {}, () => {
|
|
6570
|
+
var _a2;
|
|
6571
|
+
return [
|
|
6572
|
+
!_ctx.isEmpty && ((_a2 = _ctx.pageLayout) == null ? void 0 : _a2.length) ? (openBlock(), createBlock(_component_dao_pagination, {
|
|
6573
|
+
key: 0,
|
|
6574
|
+
"current-page": _ctx.currentPage,
|
|
6575
|
+
"onUpdate:current-page": _cache[0] || (_cache[0] = ($event) => _ctx.currentPage = $event),
|
|
6576
|
+
"page-size": _ctx.pageSize,
|
|
6577
|
+
"onUpdate:page-size": _cache[1] || (_cache[1] = ($event) => _ctx.pageSize = $event),
|
|
6578
|
+
"page-size-options": _ctx.pageSizeOptions,
|
|
6579
|
+
"page-format": _ctx.pageFormat,
|
|
6580
|
+
compact: _ctx.compact,
|
|
6581
|
+
total: _ctx.total,
|
|
6582
|
+
"total-format": _ctx.totalFormat,
|
|
6583
|
+
layout: _ctx.pageLayout,
|
|
6584
|
+
"page-sizer-width": _ctx.pageSizerWidth,
|
|
6585
|
+
onNext: _cache[2] || (_cache[2] = ($event) => {
|
|
6586
|
+
_ctx.$emit("next", $event);
|
|
6587
|
+
_ctx.clearState();
|
|
6588
|
+
}),
|
|
6589
|
+
onPrev: _cache[3] || (_cache[3] = ($event) => {
|
|
6590
|
+
_ctx.$emit("prev", $event);
|
|
6591
|
+
_ctx.clearState();
|
|
6592
|
+
}),
|
|
6593
|
+
onPageChange: _cache[4] || (_cache[4] = ($event) => {
|
|
6594
|
+
_ctx.$emit("pageChange", $event);
|
|
6595
|
+
_ctx.clearState();
|
|
6596
|
+
}),
|
|
6597
|
+
onSizeChange: _cache[5] || (_cache[5] = ($event) => {
|
|
6598
|
+
_ctx.$emit("sizeChange", $event);
|
|
6599
|
+
_ctx.clearState();
|
|
6600
|
+
})
|
|
6601
|
+
}, null, 8, ["current-page", "page-size", "page-size-options", "page-format", "compact", "total", "total-format", "layout", "page-sizer-width"])) : createCommentVNode("", true)
|
|
6602
|
+
];
|
|
6603
|
+
})
|
|
6246
6604
|
])
|
|
6247
|
-
]);
|
|
6605
|
+
], 2);
|
|
6248
6606
|
}
|
|
6249
6607
|
var table = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2]]);
|
|
6250
6608
|
var tabNav_scss_vue_type_style_index_0_src_lang = "";
|
|
@@ -6272,6 +6630,7 @@ const _sfc_main$2 = defineComponent({
|
|
|
6272
6630
|
const tabNav = ref();
|
|
6273
6631
|
let lineStyle;
|
|
6274
6632
|
let setActiveLineStyle;
|
|
6633
|
+
let tabResizeObserver;
|
|
6275
6634
|
const isLine = computed(() => props.type === "line");
|
|
6276
6635
|
const renderLines = () => {
|
|
6277
6636
|
if (!isLine.value) {
|
|
@@ -6295,19 +6654,22 @@ const _sfc_main$2 = defineComponent({
|
|
|
6295
6654
|
hoverTab.value = void 0;
|
|
6296
6655
|
}
|
|
6297
6656
|
};
|
|
6298
|
-
const activeLineStyle = ref();
|
|
6657
|
+
const activeLineStyle = ref({});
|
|
6299
6658
|
setActiveLineStyle = () => {
|
|
6300
6659
|
const tab = unref(activeTab);
|
|
6301
|
-
|
|
6302
|
-
|
|
6303
|
-
|
|
6304
|
-
|
|
6660
|
+
if (tab && tab.offsetWidth && tab.offsetLeft) {
|
|
6661
|
+
activeLineStyle.value = {
|
|
6662
|
+
"--active-line-width": `${tab.offsetWidth || 0}px`,
|
|
6663
|
+
"--active-line-left": `${tab.offsetLeft || 0}px`
|
|
6664
|
+
};
|
|
6665
|
+
}
|
|
6305
6666
|
};
|
|
6306
|
-
watch(activeTab,
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
|
|
6667
|
+
watch(activeTab, (val) => {
|
|
6668
|
+
setActiveLineStyle();
|
|
6669
|
+
tabResizeObserver == null ? void 0 : tabResizeObserver.disconnect();
|
|
6670
|
+
tabResizeObserver = new ResizeObserver(setActiveLineStyle);
|
|
6671
|
+
if (tabNav.value && val) {
|
|
6672
|
+
tabResizeObserver.observe(val);
|
|
6311
6673
|
}
|
|
6312
6674
|
});
|
|
6313
6675
|
lineStyle = computed(() => __spreadValues(__spreadValues({}, activeLineStyle.value), hoverLineStyle.value));
|
|
@@ -6320,9 +6682,8 @@ const _sfc_main$2 = defineComponent({
|
|
|
6320
6682
|
});
|
|
6321
6683
|
onMounted(renderLines);
|
|
6322
6684
|
onUnmounted(() => {
|
|
6323
|
-
var _a;
|
|
6324
6685
|
if (tabNav.value) {
|
|
6325
|
-
|
|
6686
|
+
tabResizeObserver == null ? void 0 : tabResizeObserver.disconnect();
|
|
6326
6687
|
}
|
|
6327
6688
|
});
|
|
6328
6689
|
const handleClick = (event, tab) => {
|
|
@@ -6416,11 +6777,11 @@ const _sfc_main$1 = defineComponent({
|
|
|
6416
6777
|
const tabList = reactive([]);
|
|
6417
6778
|
const tabBody = ref();
|
|
6418
6779
|
const addTab = (tab, child) => {
|
|
6419
|
-
var
|
|
6780
|
+
var _a2;
|
|
6420
6781
|
if (!child.value) {
|
|
6421
6782
|
return;
|
|
6422
6783
|
}
|
|
6423
|
-
const index2 = Array.from(((
|
|
6784
|
+
const index2 = Array.from(((_a2 = tabBody.value) == null ? void 0 : _a2.children) || []).indexOf(child.value);
|
|
6424
6785
|
if (index2 > -1) {
|
|
6425
6786
|
tabList.splice(index2, 0, tab);
|
|
6426
6787
|
}
|
|
@@ -6441,14 +6802,14 @@ const _sfc_main$1 = defineComponent({
|
|
|
6441
6802
|
};
|
|
6442
6803
|
}
|
|
6443
6804
|
});
|
|
6444
|
-
const _hoisted_1
|
|
6805
|
+
const _hoisted_1 = { class: "dao-tabs" };
|
|
6445
6806
|
const _hoisted_2 = {
|
|
6446
6807
|
ref: "tabBody",
|
|
6447
6808
|
class: "dao-tabs-body"
|
|
6448
6809
|
};
|
|
6449
6810
|
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6450
6811
|
const _component_tab_nav = resolveComponent("tab-nav");
|
|
6451
|
-
return openBlock(), createElementBlock("div", _hoisted_1
|
|
6812
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
6452
6813
|
createVNode(_component_tab_nav, {
|
|
6453
6814
|
type: _ctx.type,
|
|
6454
6815
|
"tab-list": _ctx.tabList,
|
|
@@ -6463,6 +6824,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6463
6824
|
]);
|
|
6464
6825
|
}
|
|
6465
6826
|
var tabs = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
|
|
6827
|
+
var tabItem_scss_vue_type_style_index_0_src_lang = "";
|
|
6466
6828
|
const _sfc_main = defineComponent({
|
|
6467
6829
|
name: "DaoTabItem",
|
|
6468
6830
|
props: {
|
|
@@ -6493,16 +6855,15 @@ const _sfc_main = defineComponent({
|
|
|
6493
6855
|
};
|
|
6494
6856
|
}
|
|
6495
6857
|
});
|
|
6496
|
-
const _hoisted_1 = {
|
|
6497
|
-
ref: "tabItem",
|
|
6498
|
-
class: "dao-tab-item"
|
|
6499
|
-
};
|
|
6500
6858
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6501
|
-
return
|
|
6859
|
+
return openBlock(), createElementBlock("div", {
|
|
6860
|
+
ref: "tabItem",
|
|
6861
|
+
class: normalizeClass(["dao-tab-item", {
|
|
6862
|
+
"dao-tab-item--hidden": !_ctx.active
|
|
6863
|
+
}])
|
|
6864
|
+
}, [
|
|
6502
6865
|
renderSlot(_ctx.$slots, "default")
|
|
6503
|
-
],
|
|
6504
|
-
[vShow, _ctx.active]
|
|
6505
|
-
]);
|
|
6866
|
+
], 2);
|
|
6506
6867
|
}
|
|
6507
6868
|
var tabItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
6508
6869
|
var components = /* @__PURE__ */ Object.freeze({
|