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