vue-devui 1.5.12-hotfix.1 → 1.5.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/auto-complete/index.es.js +139 -61
- package/auto-complete/index.umd.js +16 -16
- package/auto-complete/style.css +1 -1
- package/checkbox/index.es.js +115 -61
- package/checkbox/index.umd.js +15 -15
- package/checkbox/style.css +1 -1
- package/code-editor/index.es.js +5 -2
- package/code-editor/index.umd.js +6 -6
- package/code-review/index.es.js +12 -1
- package/code-review/index.umd.js +18 -18
- package/code-review/style.css +1 -1
- package/date-picker-pro/index.es.js +213 -109
- package/date-picker-pro/index.umd.js +19 -19
- package/date-picker-pro/style.css +1 -1
- package/editor-md/index.es.js +1 -1
- package/editor-md/index.umd.js +1 -1
- package/form/index.es.js +142 -64
- package/form/index.umd.js +14 -14
- package/form/style.css +1 -1
- package/image-preview/index.es.js +2 -6
- package/image-preview/index.umd.js +2 -2
- package/image-preview/style.css +1 -1
- package/input/index.es.js +207 -79
- package/input/index.umd.js +18 -18
- package/input/style.css +1 -1
- package/input-number/index.es.js +123 -46
- package/input-number/index.umd.js +20 -20
- package/input-number/style.css +1 -1
- package/mention/index.es.js +138 -60
- package/mention/index.umd.js +16 -16
- package/mention/style.css +1 -1
- package/nuxt/components/STYLE_TOKEN.js +3 -0
- package/nuxt/components/formControlProps.js +3 -0
- package/package.json +1 -1
- package/pagination/index.es.js +376 -161
- package/pagination/index.umd.js +19 -19
- package/pagination/style.css +1 -1
- package/progress/index.es.js +6 -6
- package/progress/index.umd.js +1 -1
- package/radio/index.es.js +115 -61
- package/radio/index.umd.js +16 -16
- package/radio/style.css +1 -1
- package/search/index.es.js +211 -83
- package/search/index.umd.js +19 -19
- package/search/style.css +1 -1
- package/select/index.es.js +358 -143
- package/select/index.umd.js +17 -17
- package/select/style.css +1 -1
- package/skeleton/index.es.js +1 -0
- package/skeleton/index.umd.js +2 -2
- package/steps/index.es.js +35 -11
- package/steps/index.umd.js +1 -1
- package/style.css +1 -1
- package/switch/index.es.js +115 -61
- package/switch/index.umd.js +14 -14
- package/switch/style.css +1 -1
- package/table/index.es.js +88 -34
- package/table/index.umd.js +15 -15
- package/table/style.css +1 -1
- package/textarea/index.es.js +141 -63
- package/textarea/index.umd.js +17 -17
- package/textarea/style.css +1 -1
- package/time-picker/index.es.js +159 -55
- package/time-picker/index.umd.js +11 -11
- package/time-picker/style.css +1 -1
- package/time-select/index.es.js +358 -143
- package/time-select/index.umd.js +22 -22
- package/time-select/style.css +1 -1
- package/tree/index.es.js +86 -32
- package/tree/index.umd.js +11 -11
- package/tree/style.css +1 -1
- package/types/auto-focus/index.d.ts +9 -0
- package/types/auto-focus/src/auto-focus-directive.d.ts +4 -0
- package/types/code-review/src/code-review-types.d.ts +6 -0
- package/types/code-review/src/code-review.d.ts +9 -0
- package/types/form/index.d.ts +1 -0
- package/types/form/src/components/form-control/use-form-control.d.ts +11 -2
- package/types/form/src/components/form-item/form-item-types.d.ts +10 -2
- package/types/form/src/components/form-item/form-item.d.ts +3 -3
- package/types/form/src/components/form-label/form-label.d.ts +1 -13
- package/types/form/src/components/form-label/use-form-label.d.ts +14 -2
- package/types/form/src/form-types.d.ts +11 -0
- package/types/form/src/form.d.ts +18 -0
- package/types/input/src/composables/use-input-event.d.ts +12 -2
- package/types/input/src/input-types.d.ts +8 -0
- package/types/input/src/input.d.ts +18 -0
- package/types/input-icon/src/input-icon.d.ts +18 -0
- package/types/list/index.d.ts +0 -1
- package/types/select/src/composables/use-select-menu-size.d.ts +5 -0
- package/types/select/src/select-types.d.ts +23 -4
- package/types/select/src/select.d.ts +19 -1
- package/types/select/src/use-select.d.ts +1 -1
- package/types/vue-devui.d.ts +2 -1
- package/vue-devui.es.js +415 -134
- package/vue-devui.umd.js +76 -76
package/pagination/index.es.js
CHANGED
|
@@ -29,10 +29,10 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
}
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
|
-
import { defineComponent, watch, provide, reactive, toRefs, createVNode, onUnmounted, Transition, mergeProps, ref, unref, nextTick, withModifiers, Comment, Text, h, Fragment, inject, withDirectives, cloneVNode, computed, onMounted, Teleport, createTextVNode, onBeforeUnmount, toRef, onBeforeMount, vShow, resolveComponent, getCurrentInstance, resolveDirective, resolveDynamicComponent } from "vue";
|
|
32
|
+
import { defineComponent, watch, provide, reactive, toRefs, createVNode, onUnmounted, Transition, mergeProps, ref, unref, nextTick, withModifiers, Comment, Text, h, Fragment, inject, withDirectives, cloneVNode, computed, onMounted, Teleport, createTextVNode, onBeforeUnmount, toRef, onBeforeMount, vShow, resolveComponent, getCurrentInstance, vModelText, resolveDirective, resolveDynamicComponent } from "vue";
|
|
33
|
+
import "clipboard";
|
|
33
34
|
import { onClickOutside } from "@vueuse/core";
|
|
34
35
|
import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
|
|
35
|
-
import "clipboard";
|
|
36
36
|
function className(classStr, classOpt) {
|
|
37
37
|
let classname = classStr;
|
|
38
38
|
if (typeof classOpt === "object") {
|
|
@@ -42,6 +42,35 @@ function className(classStr, classOpt) {
|
|
|
42
42
|
}
|
|
43
43
|
return classname;
|
|
44
44
|
}
|
|
45
|
+
const inBrowser = typeof window !== "undefined";
|
|
46
|
+
function getElement(element) {
|
|
47
|
+
if (element instanceof Element) {
|
|
48
|
+
return element;
|
|
49
|
+
}
|
|
50
|
+
if (element && typeof element === "object" && element.$el instanceof Element) {
|
|
51
|
+
return element.$el;
|
|
52
|
+
}
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
function lockScroll() {
|
|
56
|
+
if (document.documentElement.scrollHeight > document.documentElement.clientHeight) {
|
|
57
|
+
const scrollTop = document.documentElement.scrollTop;
|
|
58
|
+
const style = document.documentElement.getAttribute("style");
|
|
59
|
+
document.documentElement.style.position = "fixed";
|
|
60
|
+
document.documentElement.style.top = `-${scrollTop}px`;
|
|
61
|
+
document.documentElement.style.width = document.documentElement.style.width || "100%";
|
|
62
|
+
document.documentElement.style.overflowY = "scroll";
|
|
63
|
+
return () => {
|
|
64
|
+
if (style) {
|
|
65
|
+
document.documentElement.setAttribute("style", style);
|
|
66
|
+
} else {
|
|
67
|
+
document.documentElement.removeAttribute("style");
|
|
68
|
+
}
|
|
69
|
+
document.documentElement.scrollTop = scrollTop;
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
45
74
|
function createBem$1(namespace, element, modifier) {
|
|
46
75
|
let cls = namespace;
|
|
47
76
|
if (element) {
|
|
@@ -65,6 +94,9 @@ function useNamespace$1(block, needDot = false) {
|
|
|
65
94
|
em
|
|
66
95
|
};
|
|
67
96
|
}
|
|
97
|
+
function isUrl(value) {
|
|
98
|
+
return /^((http|https):)?\/\//.test(value);
|
|
99
|
+
}
|
|
68
100
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
69
101
|
var lodash = { exports: {} };
|
|
70
102
|
/**
|
|
@@ -5523,9 +5555,18 @@ const formProps = {
|
|
|
5523
5555
|
hideRequiredMark: {
|
|
5524
5556
|
type: Boolean,
|
|
5525
5557
|
default: false
|
|
5558
|
+
},
|
|
5559
|
+
styleType: {
|
|
5560
|
+
type: String,
|
|
5561
|
+
default: "default"
|
|
5562
|
+
},
|
|
5563
|
+
appendToBodyScrollStrategy: {
|
|
5564
|
+
type: String,
|
|
5565
|
+
default: "reposition"
|
|
5526
5566
|
}
|
|
5527
5567
|
};
|
|
5528
5568
|
const FORM_TOKEN = Symbol("dForm");
|
|
5569
|
+
const STYLE_TOKEN = Symbol("dForm");
|
|
5529
5570
|
function useFieldCollection() {
|
|
5530
5571
|
const itemContexts = [];
|
|
5531
5572
|
const addItemContext = (field) => {
|
|
@@ -5620,6 +5661,7 @@ defineComponent({
|
|
|
5620
5661
|
addItemContext,
|
|
5621
5662
|
removeItemContext
|
|
5622
5663
|
})));
|
|
5664
|
+
provide(STYLE_TOKEN, props.styleType);
|
|
5623
5665
|
ctx2.expose({
|
|
5624
5666
|
validate,
|
|
5625
5667
|
validateFields,
|
|
@@ -5661,7 +5703,7 @@ const formItemProps = {
|
|
|
5661
5703
|
default: void 0
|
|
5662
5704
|
},
|
|
5663
5705
|
helpTips: {
|
|
5664
|
-
type: String,
|
|
5706
|
+
type: [String, Object],
|
|
5665
5707
|
default: ""
|
|
5666
5708
|
},
|
|
5667
5709
|
feedbackStatus: {
|
|
@@ -5674,12 +5716,6 @@ const formItemProps = {
|
|
|
5674
5716
|
};
|
|
5675
5717
|
const FORM_ITEM_TOKEN = Symbol("dFormItem");
|
|
5676
5718
|
const LABEL_DATA = Symbol("labelData");
|
|
5677
|
-
const formLabelProps = {
|
|
5678
|
-
helpTips: {
|
|
5679
|
-
type: String,
|
|
5680
|
-
default: ""
|
|
5681
|
-
}
|
|
5682
|
-
};
|
|
5683
5719
|
const fixedOverlayProps = {
|
|
5684
5720
|
modelValue: {
|
|
5685
5721
|
type: Boolean,
|
|
@@ -5694,25 +5730,6 @@ const fixedOverlayProps = {
|
|
|
5694
5730
|
default: true
|
|
5695
5731
|
}
|
|
5696
5732
|
};
|
|
5697
|
-
function lockScroll() {
|
|
5698
|
-
if (document.documentElement.scrollHeight > document.documentElement.clientHeight) {
|
|
5699
|
-
const scrollTop = document.documentElement.scrollTop;
|
|
5700
|
-
const style = document.documentElement.getAttribute("style");
|
|
5701
|
-
document.documentElement.style.position = "fixed";
|
|
5702
|
-
document.documentElement.style.top = `-${scrollTop}px`;
|
|
5703
|
-
document.documentElement.style.width = document.documentElement.style.width || "100%";
|
|
5704
|
-
document.documentElement.style.overflowY = "scroll";
|
|
5705
|
-
return () => {
|
|
5706
|
-
if (style) {
|
|
5707
|
-
document.documentElement.setAttribute("style", style);
|
|
5708
|
-
} else {
|
|
5709
|
-
document.documentElement.removeAttribute("style");
|
|
5710
|
-
}
|
|
5711
|
-
document.documentElement.scrollTop = scrollTop;
|
|
5712
|
-
};
|
|
5713
|
-
}
|
|
5714
|
-
return;
|
|
5715
|
-
}
|
|
5716
5733
|
function useFixedOverlay(props, ctx2) {
|
|
5717
5734
|
let lockScrollCb;
|
|
5718
5735
|
const onClick = (event) => {
|
|
@@ -5735,6 +5752,29 @@ function useFixedOverlay(props, ctx2) {
|
|
|
5735
5752
|
onUnmounted(removeBodyAdditions);
|
|
5736
5753
|
return { onClick };
|
|
5737
5754
|
}
|
|
5755
|
+
function createBem(namespace, element, modifier) {
|
|
5756
|
+
let cls = namespace;
|
|
5757
|
+
if (element) {
|
|
5758
|
+
cls += `__${element}`;
|
|
5759
|
+
}
|
|
5760
|
+
if (modifier) {
|
|
5761
|
+
cls += `--${modifier}`;
|
|
5762
|
+
}
|
|
5763
|
+
return cls;
|
|
5764
|
+
}
|
|
5765
|
+
function useNamespace(block, needDot = false) {
|
|
5766
|
+
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
5767
|
+
const b = () => createBem(namespace);
|
|
5768
|
+
const e = (element) => element ? createBem(namespace, element) : "";
|
|
5769
|
+
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
5770
|
+
const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
|
|
5771
|
+
return {
|
|
5772
|
+
b,
|
|
5773
|
+
e,
|
|
5774
|
+
m,
|
|
5775
|
+
em
|
|
5776
|
+
};
|
|
5777
|
+
}
|
|
5738
5778
|
var fixedOverlay = "";
|
|
5739
5779
|
defineComponent({
|
|
5740
5780
|
name: "DFixedOverlay",
|
|
@@ -5745,7 +5785,7 @@ defineComponent({
|
|
|
5745
5785
|
const {
|
|
5746
5786
|
modelValue
|
|
5747
5787
|
} = toRefs(props);
|
|
5748
|
-
const ns2 = useNamespace
|
|
5788
|
+
const ns2 = useNamespace("fixed-overlay");
|
|
5749
5789
|
const {
|
|
5750
5790
|
onClick
|
|
5751
5791
|
} = useFixedOverlay(props, ctx2);
|
|
@@ -5911,7 +5951,7 @@ const FlexibleOverlay = defineComponent({
|
|
|
5911
5951
|
emit,
|
|
5912
5952
|
expose
|
|
5913
5953
|
}) {
|
|
5914
|
-
const ns2 = useNamespace
|
|
5954
|
+
const ns2 = useNamespace("flexible-overlay");
|
|
5915
5955
|
const {
|
|
5916
5956
|
clickEventBubble
|
|
5917
5957
|
} = toRefs(props);
|
|
@@ -5938,10 +5978,9 @@ const FlexibleOverlay = defineComponent({
|
|
|
5938
5978
|
};
|
|
5939
5979
|
}
|
|
5940
5980
|
});
|
|
5941
|
-
const inBrowser = typeof window !== "undefined";
|
|
5942
5981
|
const POPPER_TRIGGER_TOKEN = Symbol("popper-trigger");
|
|
5943
5982
|
const isObject = (val) => val !== null && typeof val === "object";
|
|
5944
|
-
const ns$1 = useNamespace
|
|
5983
|
+
const ns$1 = useNamespace("popper-trigger");
|
|
5945
5984
|
function wrapContent(content) {
|
|
5946
5985
|
return h("span", { class: ns$1.b() }, content);
|
|
5947
5986
|
}
|
|
@@ -6128,7 +6167,7 @@ function usePopoverEvent(props, visible, origin) {
|
|
|
6128
6167
|
});
|
|
6129
6168
|
return { placement, handlePositionChange, onMouseenter, onMouseleave };
|
|
6130
6169
|
}
|
|
6131
|
-
const ns = useNamespace
|
|
6170
|
+
const ns = useNamespace("popover");
|
|
6132
6171
|
function SuccessIcon$1() {
|
|
6133
6172
|
return createVNode("svg", {
|
|
6134
6173
|
"class": [ns.e("icon"), ns.em("icon", "success")],
|
|
@@ -6230,7 +6269,7 @@ var PopoverIcon = defineComponent({
|
|
|
6230
6269
|
}
|
|
6231
6270
|
},
|
|
6232
6271
|
setup(props) {
|
|
6233
|
-
const ns2 = useNamespace
|
|
6272
|
+
const ns2 = useNamespace("popover");
|
|
6234
6273
|
return () => props.type && props.type !== "default" && createVNode("span", {
|
|
6235
6274
|
"class": ns2.e("icon-wrap")
|
|
6236
6275
|
}, [props.type === "success" && createVNode(SuccessIcon$1, null, null), props.type === "warning" && createVNode(WarningIcon, null, null), props.type === "info" && createVNode(InfoIcon, null, null), props.type === "error" && createVNode(ErrorIcon$1, null, null)]);
|
|
@@ -6267,7 +6306,7 @@ var Popover = defineComponent({
|
|
|
6267
6306
|
const {
|
|
6268
6307
|
overlayStyles
|
|
6269
6308
|
} = usePopover(props, visible, placement, origin, popoverRef);
|
|
6270
|
-
const ns2 = useNamespace
|
|
6309
|
+
const ns2 = useNamespace("popover");
|
|
6271
6310
|
provide(POPPER_TRIGGER_TOKEN, origin);
|
|
6272
6311
|
watch(visible, (newVal) => {
|
|
6273
6312
|
if (newVal) {
|
|
@@ -6401,6 +6440,12 @@ function useFormLabel() {
|
|
|
6401
6440
|
const formItemContext = inject(FORM_ITEM_TOKEN);
|
|
6402
6441
|
const labelData = inject(LABEL_DATA);
|
|
6403
6442
|
const ns2 = useNamespace$1("form");
|
|
6443
|
+
const defaultTipsPopover = {
|
|
6444
|
+
content: "",
|
|
6445
|
+
position: ["top"],
|
|
6446
|
+
trigger: "hover",
|
|
6447
|
+
popType: "info"
|
|
6448
|
+
};
|
|
6404
6449
|
const labelClasses = computed(() => ({
|
|
6405
6450
|
[`${ns2.e("label")}`]: true,
|
|
6406
6451
|
[`${ns2.em("label", "vertical")}`]: labelData.value.layout === "vertical",
|
|
@@ -6412,17 +6457,24 @@ function useFormLabel() {
|
|
|
6412
6457
|
[`${ns2.em("label", "required")}`]: formItemContext.isRequired,
|
|
6413
6458
|
[`${ns2.em("label", "required-hide")}`]: formItemContext.isRequired && formContext.hideRequiredMark
|
|
6414
6459
|
}));
|
|
6415
|
-
|
|
6460
|
+
const tipsPopover = computed(() => {
|
|
6461
|
+
if (typeof labelData.value.helpTips === "string") {
|
|
6462
|
+
return __spreadProps(__spreadValues({}, defaultTipsPopover), { content: labelData.value.helpTips });
|
|
6463
|
+
} else {
|
|
6464
|
+
return __spreadValues(__spreadValues({}, defaultTipsPopover), labelData.value.helpTips);
|
|
6465
|
+
}
|
|
6466
|
+
});
|
|
6467
|
+
return { labelClasses, labelInnerClasses, tipsPopover };
|
|
6416
6468
|
}
|
|
6417
6469
|
var formLabel = "";
|
|
6418
6470
|
var FormLabel = defineComponent({
|
|
6419
6471
|
name: "DFormLabel",
|
|
6420
|
-
|
|
6421
|
-
setup(props, ctx2) {
|
|
6472
|
+
setup(_, ctx2) {
|
|
6422
6473
|
const ns2 = useNamespace$1("form");
|
|
6423
6474
|
const {
|
|
6424
6475
|
labelClasses,
|
|
6425
|
-
labelInnerClasses
|
|
6476
|
+
labelInnerClasses,
|
|
6477
|
+
tipsPopover
|
|
6426
6478
|
} = useFormLabel();
|
|
6427
6479
|
return () => {
|
|
6428
6480
|
var _a, _b;
|
|
@@ -6430,12 +6482,9 @@ var FormLabel = defineComponent({
|
|
|
6430
6482
|
"class": labelClasses.value
|
|
6431
6483
|
}, [createVNode("span", {
|
|
6432
6484
|
"class": labelInnerClasses.value
|
|
6433
|
-
}, [(_b = (_a = ctx2.slots).default) == null ? void 0 : _b.call(_a)]),
|
|
6434
|
-
"
|
|
6435
|
-
|
|
6436
|
-
"trigger": "hover",
|
|
6437
|
-
"pop-type": "info"
|
|
6438
|
-
}, {
|
|
6485
|
+
}, [(_b = (_a = ctx2.slots).default) == null ? void 0 : _b.call(_a)]), tipsPopover.value.content && createVNode(Popover, mergeProps({
|
|
6486
|
+
"class": ns2.e("label-tips-popover")
|
|
6487
|
+
}, tipsPopover.value), {
|
|
6439
6488
|
default: () => [createVNode(HelpTipsIcon, {
|
|
6440
6489
|
"class": ns2.e("label-help")
|
|
6441
6490
|
}, null), createTextVNode(",")]
|
|
@@ -6466,7 +6515,7 @@ function useFormControl(props) {
|
|
|
6466
6515
|
[ns2.em("control-container", "has-feedback")]: Boolean(feedbackStatus == null ? void 0 : feedbackStatus.value),
|
|
6467
6516
|
[ns2.em("control-container", "feedback-error")]: Boolean((feedbackStatus == null ? void 0 : feedbackStatus.value) === "error")
|
|
6468
6517
|
}));
|
|
6469
|
-
return { controlClasses, controlContainerClasses };
|
|
6518
|
+
return { controlClasses, controlContainerClasses, labelData };
|
|
6470
6519
|
}
|
|
6471
6520
|
function useFormControlValidate() {
|
|
6472
6521
|
const formItemContext = inject(FORM_ITEM_TOKEN);
|
|
@@ -6483,11 +6532,15 @@ var FormControl = defineComponent({
|
|
|
6483
6532
|
name: "DFormControl",
|
|
6484
6533
|
props: formControlProps,
|
|
6485
6534
|
setup(props, ctx2) {
|
|
6535
|
+
const formContext = inject(FORM_TOKEN);
|
|
6486
6536
|
const formControl2 = ref();
|
|
6537
|
+
const popoverRef = ref();
|
|
6487
6538
|
const ns2 = useNamespace$1("form");
|
|
6539
|
+
const showPopoverClick = ref(true);
|
|
6488
6540
|
const {
|
|
6489
6541
|
controlClasses,
|
|
6490
|
-
controlContainerClasses
|
|
6542
|
+
controlContainerClasses,
|
|
6543
|
+
labelData
|
|
6491
6544
|
} = useFormControl(props);
|
|
6492
6545
|
const {
|
|
6493
6546
|
feedbackStatus,
|
|
@@ -6497,17 +6550,52 @@ var FormControl = defineComponent({
|
|
|
6497
6550
|
errorMessage,
|
|
6498
6551
|
popPosition
|
|
6499
6552
|
} = useFormControlValidate();
|
|
6553
|
+
const align = computed(() => {
|
|
6554
|
+
var _a, _b;
|
|
6555
|
+
if ((_a = popPosition.value) == null ? void 0 : _a.some((item) => item.includes("start"))) {
|
|
6556
|
+
return "start";
|
|
6557
|
+
}
|
|
6558
|
+
if ((_b = popPosition.value) == null ? void 0 : _b.some((item) => item.includes("end"))) {
|
|
6559
|
+
return "end";
|
|
6560
|
+
}
|
|
6561
|
+
return void 0;
|
|
6562
|
+
});
|
|
6563
|
+
const onDocumentClick = (e) => {
|
|
6564
|
+
const composedPath = e.composedPath();
|
|
6565
|
+
if (composedPath.includes(popoverRef.value.triggerEl)) {
|
|
6566
|
+
showPopoverClick.value = true;
|
|
6567
|
+
} else {
|
|
6568
|
+
showPopoverClick.value = false;
|
|
6569
|
+
}
|
|
6570
|
+
};
|
|
6571
|
+
watch(showPopover, (val) => {
|
|
6572
|
+
if (val) {
|
|
6573
|
+
setTimeout(() => {
|
|
6574
|
+
document.addEventListener("click", onDocumentClick);
|
|
6575
|
+
});
|
|
6576
|
+
} else {
|
|
6577
|
+
showPopoverClick.value = true;
|
|
6578
|
+
document.removeEventListener("click", onDocumentClick);
|
|
6579
|
+
}
|
|
6580
|
+
});
|
|
6581
|
+
onUnmounted(() => {
|
|
6582
|
+
document.removeEventListener("click", onDocumentClick);
|
|
6583
|
+
});
|
|
6500
6584
|
return () => createVNode("div", {
|
|
6501
6585
|
"class": controlClasses.value,
|
|
6502
6586
|
"ref": formControl2
|
|
6503
6587
|
}, [createVNode("div", {
|
|
6504
6588
|
"class": controlContainerClasses.value
|
|
6505
6589
|
}, [createVNode(Popover, {
|
|
6506
|
-
"
|
|
6590
|
+
"ref": popoverRef,
|
|
6591
|
+
"is-open": showPopover.value && showPopoverClick.value,
|
|
6507
6592
|
"trigger": "manually",
|
|
6508
6593
|
"content": errorMessage.value,
|
|
6509
6594
|
"pop-type": "error",
|
|
6510
|
-
"position": popPosition.value
|
|
6595
|
+
"position": popPosition.value,
|
|
6596
|
+
"align": align.value,
|
|
6597
|
+
"scroll-element": "auto",
|
|
6598
|
+
"append-to-body-scroll-strategy": formContext.appendToBodyScrollStrategy
|
|
6511
6599
|
}, {
|
|
6512
6600
|
default: () => {
|
|
6513
6601
|
var _a, _b;
|
|
@@ -6519,7 +6607,7 @@ var FormControl = defineComponent({
|
|
|
6519
6607
|
"class": ns2.e("control-info")
|
|
6520
6608
|
}, [showMessage.value && createVNode("div", {
|
|
6521
6609
|
"class": "error-message"
|
|
6522
|
-
}, [errorMessage.value]), props.extraInfo && createVNode("div", {
|
|
6610
|
+
}, [errorMessage.value]), labelData.value.formItemCtx.slots.extraInfo ? labelData.value.formItemCtx.slots.extraInfo() : props.extraInfo && createVNode("div", {
|
|
6523
6611
|
"class": ns2.e("control-extra")
|
|
6524
6612
|
}, [props.extraInfo])])]);
|
|
6525
6613
|
}
|
|
@@ -7702,7 +7790,9 @@ defineComponent({
|
|
|
7702
7790
|
const labelData = computed(() => ({
|
|
7703
7791
|
layout: formContext.layout,
|
|
7704
7792
|
labelSize: formContext.labelSize,
|
|
7705
|
-
labelAlign: formContext.labelAlign
|
|
7793
|
+
labelAlign: formContext.labelAlign,
|
|
7794
|
+
helpTips: helpTips.value,
|
|
7795
|
+
formItemCtx: ctx2
|
|
7706
7796
|
}));
|
|
7707
7797
|
provide(LABEL_DATA, labelData);
|
|
7708
7798
|
const context = reactive(__spreadProps(__spreadValues({}, otherProps), {
|
|
@@ -7718,6 +7808,7 @@ defineComponent({
|
|
|
7718
7808
|
}));
|
|
7719
7809
|
provide(FORM_ITEM_TOKEN, context);
|
|
7720
7810
|
ctx2.expose({
|
|
7811
|
+
validate,
|
|
7721
7812
|
resetField,
|
|
7722
7813
|
clearValidate
|
|
7723
7814
|
});
|
|
@@ -7731,9 +7822,7 @@ defineComponent({
|
|
|
7731
7822
|
});
|
|
7732
7823
|
return () => createVNode("div", {
|
|
7733
7824
|
"class": itemClasses.value
|
|
7734
|
-
}, [createVNode(FormLabel, {
|
|
7735
|
-
"help-tips": helpTips.value
|
|
7736
|
-
}, {
|
|
7825
|
+
}, [createVNode(FormLabel, null, {
|
|
7737
7826
|
default: () => [ctx2.slots.label ? ctx2.slots.label() : label == null ? void 0 : label.value]
|
|
7738
7827
|
}), createVNode(FormControl, {
|
|
7739
7828
|
"feedback-status": feedbackStatus == null ? void 0 : feedbackStatus.value,
|
|
@@ -7776,7 +7865,6 @@ function useSelect(props, selectRef, ctx2, focus, blur, isSelectFocus, t) {
|
|
|
7776
7865
|
const selectDisabled = computed(() => (formContext == null ? void 0 : formContext.disabled) || props.disabled);
|
|
7777
7866
|
const selectSize = computed(() => props.size || (formContext == null ? void 0 : formContext.size) || "md");
|
|
7778
7867
|
const isObjectOption = ref(false);
|
|
7779
|
-
const originRef = ref();
|
|
7780
7868
|
const isOpen = ref(false);
|
|
7781
7869
|
const toggleChange = (bool) => {
|
|
7782
7870
|
if (selectDisabled.value) {
|
|
@@ -7786,7 +7874,14 @@ function useSelect(props, selectRef, ctx2, focus, blur, isSelectFocus, t) {
|
|
|
7786
7874
|
ctx2.emit("toggle-change", bool);
|
|
7787
7875
|
};
|
|
7788
7876
|
onClickOutside(dropdownRef, () => {
|
|
7789
|
-
|
|
7877
|
+
var _a;
|
|
7878
|
+
if (props.multiple && isOpen.value) {
|
|
7879
|
+
(_a = selectRef.value) == null ? void 0 : _a.clearMultipleSearchKey();
|
|
7880
|
+
onBlur();
|
|
7881
|
+
}
|
|
7882
|
+
if (isOpen.value) {
|
|
7883
|
+
toggleChange(false);
|
|
7884
|
+
}
|
|
7790
7885
|
}, { ignore: [selectRef] });
|
|
7791
7886
|
const dropdownMenuMultipleNs = useNamespace$1("dropdown-menu-multiple");
|
|
7792
7887
|
const selectCls = computed(() => {
|
|
@@ -7899,8 +7994,11 @@ function useSelect(props, selectRef, ctx2, focus, blur, isSelectFocus, t) {
|
|
|
7899
7994
|
}
|
|
7900
7995
|
};
|
|
7901
7996
|
const valueChange = (item) => {
|
|
7997
|
+
var _a;
|
|
7902
7998
|
const { multiple } = props;
|
|
7903
7999
|
let { modelValue } = props;
|
|
8000
|
+
filterQuery.value = "";
|
|
8001
|
+
handlerQueryFunc("");
|
|
7904
8002
|
if (multiple) {
|
|
7905
8003
|
const checkedItems = Array.isArray(modelValue) ? modelValue.slice() : [];
|
|
7906
8004
|
const index2 = checkedItems.indexOf(item.value);
|
|
@@ -7927,6 +8025,7 @@ function useSelect(props, selectRef, ctx2, focus, blur, isSelectFocus, t) {
|
|
|
7927
8025
|
}
|
|
7928
8026
|
getMultipleSelected(checkedItems);
|
|
7929
8027
|
} else {
|
|
8028
|
+
(_a = selectRef.value) == null ? void 0 : _a.clearSingleSearchKey();
|
|
7930
8029
|
ctx2.emit("update:modelValue", item.value);
|
|
7931
8030
|
getSingleSelected(item);
|
|
7932
8031
|
toggleChange(false);
|
|
@@ -7937,6 +8036,8 @@ function useSelect(props, selectRef, ctx2, focus, blur, isSelectFocus, t) {
|
|
|
7937
8036
|
ctx2.emit("toggle-change", false);
|
|
7938
8037
|
};
|
|
7939
8038
|
const handleClear = () => {
|
|
8039
|
+
filterQuery.value = "";
|
|
8040
|
+
handlerQueryFunc("");
|
|
7940
8041
|
if (props.multiple) {
|
|
7941
8042
|
ctx2.emit("update:modelValue", []);
|
|
7942
8043
|
ctx2.emit("value-change", []);
|
|
@@ -7949,7 +8050,6 @@ function useSelect(props, selectRef, ctx2, focus, blur, isSelectFocus, t) {
|
|
|
7949
8050
|
handleClose();
|
|
7950
8051
|
blur();
|
|
7951
8052
|
}
|
|
7952
|
-
filterQuery.value = "";
|
|
7953
8053
|
};
|
|
7954
8054
|
const tagDelete = (data) => {
|
|
7955
8055
|
let { modelValue } = props;
|
|
@@ -7967,15 +8067,17 @@ function useSelect(props, selectRef, ctx2, focus, blur, isSelectFocus, t) {
|
|
|
7967
8067
|
ctx2.emit("remove-tag", data.value);
|
|
7968
8068
|
getMultipleSelected(checkedItems);
|
|
7969
8069
|
};
|
|
7970
|
-
const onFocus = (
|
|
7971
|
-
ctx2.emit("focus", e);
|
|
8070
|
+
const onFocus = () => {
|
|
7972
8071
|
if (!selectDisabled.value) {
|
|
7973
8072
|
isSelectFocus.value = true;
|
|
7974
8073
|
}
|
|
7975
8074
|
};
|
|
7976
|
-
const onBlur = (
|
|
7977
|
-
ctx2.emit("blur", e);
|
|
8075
|
+
const onBlur = () => {
|
|
7978
8076
|
if (!selectDisabled.value) {
|
|
8077
|
+
setTimeout(() => {
|
|
8078
|
+
filterQuery.value = "";
|
|
8079
|
+
handlerQueryFunc("");
|
|
8080
|
+
}, 150);
|
|
7979
8081
|
isSelectFocus.value = false;
|
|
7980
8082
|
}
|
|
7981
8083
|
};
|
|
@@ -8008,7 +8110,7 @@ function useSelect(props, selectRef, ctx2, focus, blur, isSelectFocus, t) {
|
|
|
8008
8110
|
const emptyText = computed(() => {
|
|
8009
8111
|
const visibleOptionsCount = injectOptionsArray.value.filter((item) => {
|
|
8010
8112
|
const label = item.name || item.value;
|
|
8011
|
-
return label.toString().toLocaleLowerCase().includes(filterQuery.value.
|
|
8113
|
+
return label.toString().toLocaleLowerCase().includes(filterQuery.value.trim().toLocaleLowerCase());
|
|
8012
8114
|
}).length;
|
|
8013
8115
|
if (isLoading.value) {
|
|
8014
8116
|
return props.loadingText || t("loadingText");
|
|
@@ -8035,7 +8137,8 @@ function useSelect(props, selectRef, ctx2, focus, blur, isSelectFocus, t) {
|
|
|
8035
8137
|
}
|
|
8036
8138
|
};
|
|
8037
8139
|
watch(() => props.modelValue, () => {
|
|
8038
|
-
formItemContext == null ? void 0 : formItemContext.validate("change").catch((
|
|
8140
|
+
formItemContext == null ? void 0 : formItemContext.validate("change").catch(() => {
|
|
8141
|
+
});
|
|
8039
8142
|
updateInjectOptionsStatus();
|
|
8040
8143
|
}, { deep: true });
|
|
8041
8144
|
watch(injectOptions, () => {
|
|
@@ -8050,10 +8153,17 @@ function useSelect(props, selectRef, ctx2, focus, blur, isSelectFocus, t) {
|
|
|
8050
8153
|
(_a = dropdownRef.value) == null ? void 0 : _a.updatePosition();
|
|
8051
8154
|
}
|
|
8052
8155
|
}, { flush: "post" });
|
|
8156
|
+
watch(isSelectFocus, (val) => {
|
|
8157
|
+
if (val) {
|
|
8158
|
+
ctx2.emit("focus");
|
|
8159
|
+
} else {
|
|
8160
|
+
ctx2.emit("blur");
|
|
8161
|
+
}
|
|
8162
|
+
});
|
|
8163
|
+
onMounted(updateInjectOptionsStatus);
|
|
8053
8164
|
return {
|
|
8054
8165
|
selectDisabled,
|
|
8055
8166
|
selectSize,
|
|
8056
|
-
originRef,
|
|
8057
8167
|
dropdownRef,
|
|
8058
8168
|
isOpen,
|
|
8059
8169
|
selectCls,
|
|
@@ -8078,7 +8188,7 @@ function useSelect(props, selectRef, ctx2, focus, blur, isSelectFocus, t) {
|
|
|
8078
8188
|
}
|
|
8079
8189
|
const selectProps = {
|
|
8080
8190
|
modelValue: {
|
|
8081
|
-
type: [String, Number, Array],
|
|
8191
|
+
type: [String, Number, Array, Boolean],
|
|
8082
8192
|
default: ""
|
|
8083
8193
|
},
|
|
8084
8194
|
"onUpdate:modelValue": {
|
|
@@ -8093,6 +8203,10 @@ const selectProps = {
|
|
|
8093
8203
|
type: String,
|
|
8094
8204
|
default: ""
|
|
8095
8205
|
},
|
|
8206
|
+
position: {
|
|
8207
|
+
type: Array,
|
|
8208
|
+
default: () => ["bottom", "top"]
|
|
8209
|
+
},
|
|
8096
8210
|
overview: {
|
|
8097
8211
|
type: String,
|
|
8098
8212
|
default: "border"
|
|
@@ -8164,6 +8278,10 @@ const selectProps = {
|
|
|
8164
8278
|
multipleLimit: {
|
|
8165
8279
|
type: Number,
|
|
8166
8280
|
default: 0
|
|
8281
|
+
},
|
|
8282
|
+
showEmptyWhenUnmatched: {
|
|
8283
|
+
type: Boolean,
|
|
8284
|
+
default: true
|
|
8167
8285
|
}
|
|
8168
8286
|
};
|
|
8169
8287
|
const optionProps = {
|
|
@@ -8302,41 +8420,6 @@ const checkboxGroupProps = __spreadProps(__spreadValues({}, commonProps), {
|
|
|
8302
8420
|
}
|
|
8303
8421
|
});
|
|
8304
8422
|
const checkboxGroupInjectionKey = Symbol("d-checkbox-group");
|
|
8305
|
-
function getElement(element) {
|
|
8306
|
-
if (element instanceof Element) {
|
|
8307
|
-
return element;
|
|
8308
|
-
}
|
|
8309
|
-
if (element && typeof element === "object" && element.$el instanceof Element) {
|
|
8310
|
-
return element.$el;
|
|
8311
|
-
}
|
|
8312
|
-
return null;
|
|
8313
|
-
}
|
|
8314
|
-
function createBem(namespace, element, modifier) {
|
|
8315
|
-
let cls = namespace;
|
|
8316
|
-
if (element) {
|
|
8317
|
-
cls += `__${element}`;
|
|
8318
|
-
}
|
|
8319
|
-
if (modifier) {
|
|
8320
|
-
cls += `--${modifier}`;
|
|
8321
|
-
}
|
|
8322
|
-
return cls;
|
|
8323
|
-
}
|
|
8324
|
-
function useNamespace(block, needDot = false) {
|
|
8325
|
-
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
8326
|
-
const b = () => createBem(namespace);
|
|
8327
|
-
const e = (element) => element ? createBem(namespace, element) : "";
|
|
8328
|
-
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
8329
|
-
const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
|
|
8330
|
-
return {
|
|
8331
|
-
b,
|
|
8332
|
-
e,
|
|
8333
|
-
m,
|
|
8334
|
-
em
|
|
8335
|
-
};
|
|
8336
|
-
}
|
|
8337
|
-
function isUrl(value) {
|
|
8338
|
-
return /^((http|https):)?\/\//.test(value);
|
|
8339
|
-
}
|
|
8340
8423
|
function useCheckbox(props, ctx2) {
|
|
8341
8424
|
const formContext = inject(FORM_TOKEN, void 0);
|
|
8342
8425
|
const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
|
|
@@ -8495,7 +8578,7 @@ var Checkbox = defineComponent({
|
|
|
8495
8578
|
props: checkboxProps,
|
|
8496
8579
|
emits: ["change", "update:checked", "update:modelValue"],
|
|
8497
8580
|
setup(props, ctx2) {
|
|
8498
|
-
const ns2 = useNamespace("checkbox");
|
|
8581
|
+
const ns2 = useNamespace$1("checkbox");
|
|
8499
8582
|
const {
|
|
8500
8583
|
mergedChecked,
|
|
8501
8584
|
mergedDisabled,
|
|
@@ -8596,7 +8679,7 @@ defineComponent({
|
|
|
8596
8679
|
props: checkboxGroupProps,
|
|
8597
8680
|
emits: ["change", "update:modelValue"],
|
|
8598
8681
|
setup(props, ctx2) {
|
|
8599
|
-
const ns2 = useNamespace("checkbox");
|
|
8682
|
+
const ns2 = useNamespace$1("checkbox");
|
|
8600
8683
|
const {
|
|
8601
8684
|
defaultOpt
|
|
8602
8685
|
} = useCheckboxGroup(props, ctx2);
|
|
@@ -8642,7 +8725,7 @@ defineComponent({
|
|
|
8642
8725
|
props: checkboxProps,
|
|
8643
8726
|
emits: ["change", "update:checked", "update:modelValue"],
|
|
8644
8727
|
setup(props, ctx2) {
|
|
8645
|
-
const ns2 = useNamespace("checkbox-button");
|
|
8728
|
+
const ns2 = useNamespace$1("checkbox-button");
|
|
8646
8729
|
const {
|
|
8647
8730
|
mergedChecked,
|
|
8648
8731
|
mergedDisabled,
|
|
@@ -8705,20 +8788,23 @@ function useOption(props) {
|
|
|
8705
8788
|
return select2.modelValue === props.value;
|
|
8706
8789
|
}
|
|
8707
8790
|
});
|
|
8791
|
+
const isDisabled = computed(() => props.disabled || ((optionGroup == null ? void 0 : optionGroup.disabled) ? true : false));
|
|
8708
8792
|
const optionItem = computed(() => {
|
|
8709
8793
|
return {
|
|
8710
8794
|
name: props.name || props.value + "" || "",
|
|
8711
8795
|
value: props.value,
|
|
8712
8796
|
create: props.create,
|
|
8713
|
-
_checked: false
|
|
8797
|
+
_checked: false,
|
|
8798
|
+
disabled: isDisabled.value
|
|
8714
8799
|
};
|
|
8715
8800
|
});
|
|
8716
|
-
const isDisabled = computed(() => props.disabled || ((optionGroup == null ? void 0 : optionGroup.disabled) ? true : false));
|
|
8717
8801
|
const isObjectOption = ref(!!props.name);
|
|
8718
8802
|
const selectOptionCls = computed(() => {
|
|
8719
8803
|
return className(ns2.e("item"), {
|
|
8720
8804
|
active: isOptionSelected.value,
|
|
8721
|
-
disabled: isDisabled.value
|
|
8805
|
+
disabled: isDisabled.value,
|
|
8806
|
+
[ns2.em("item", "sm")]: (select2 == null ? void 0 : select2.selectSize) === "sm",
|
|
8807
|
+
[ns2.em("item", "lg")]: (select2 == null ? void 0 : select2.selectSize) === "lg"
|
|
8722
8808
|
});
|
|
8723
8809
|
});
|
|
8724
8810
|
const optionSelect = () => {
|
|
@@ -8834,7 +8920,7 @@ const tagProps = {
|
|
|
8834
8920
|
}
|
|
8835
8921
|
};
|
|
8836
8922
|
function useClass(props) {
|
|
8837
|
-
const ns2 = useNamespace
|
|
8923
|
+
const ns2 = useNamespace("tag");
|
|
8838
8924
|
return computed(() => {
|
|
8839
8925
|
const { type: type4, color, deletable } = props;
|
|
8840
8926
|
return `${ns2.e("item")} ${ns2.m(type4 || (color ? "colorful" : "") || "default")} ${deletable ? ns2.m("deletable") : ""} ${ns2.m(props.size)}`;
|
|
@@ -8876,7 +8962,7 @@ var Tag = defineComponent({
|
|
|
8876
8962
|
slots,
|
|
8877
8963
|
emit
|
|
8878
8964
|
}) {
|
|
8879
|
-
const ns2 = useNamespace
|
|
8965
|
+
const ns2 = useNamespace("tag");
|
|
8880
8966
|
const {
|
|
8881
8967
|
type: type4,
|
|
8882
8968
|
color,
|
|
@@ -9103,9 +9189,13 @@ function useSelectContent() {
|
|
|
9103
9189
|
const ns2 = useNamespace$1("select");
|
|
9104
9190
|
const select2 = inject(SELECT_TOKEN);
|
|
9105
9191
|
const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
|
|
9192
|
+
const styleType = inject(STYLE_TOKEN, void 0);
|
|
9106
9193
|
const app = getCurrentInstance();
|
|
9107
9194
|
const t = createI18nTranslate("DSelect", app);
|
|
9108
9195
|
const searchQuery = ref("");
|
|
9196
|
+
const singleSearchKey = ref("");
|
|
9197
|
+
const singleInputRef = ref();
|
|
9198
|
+
const singlePlaceholderWidth = computed(() => (select2 == null ? void 0 : select2.dropdownWidth) ? `${(select2 == null ? void 0 : select2.dropdownWidth) - 40}px` : "auto");
|
|
9109
9199
|
const selectedData = computed(() => {
|
|
9110
9200
|
return (select2 == null ? void 0 : select2.selectedOptions) || [];
|
|
9111
9201
|
});
|
|
@@ -9123,21 +9213,37 @@ function useSelectContent() {
|
|
|
9123
9213
|
const displayInputValue = computed(() => {
|
|
9124
9214
|
var _a;
|
|
9125
9215
|
if (select2 == null ? void 0 : select2.selectedOptions) {
|
|
9126
|
-
return select2.selectedOptions.length > 1 ? select2.selectedOptions.map((item) => (item == null ? void 0 : item.name) || (item == null ? void 0 : item.value) || "").join(",") : ((_a = select2.selectedOptions[0]) == null ? void 0 : _a.name) || "";
|
|
9216
|
+
return select2.selectedOptions.length > 1 ? select2.selectedOptions.map((item) => (item == null ? void 0 : item.name) || (item == null ? void 0 : item.value) || "").join(",") : ((_a = select2.selectedOptions[0]) == null ? void 0 : _a.name) || (select2.showEmptyWhenUnmatched ? "" : select2.modelValue);
|
|
9127
9217
|
} else {
|
|
9128
9218
|
return "";
|
|
9129
9219
|
}
|
|
9130
9220
|
});
|
|
9221
|
+
const isPlaceholderDark = computed(() => {
|
|
9222
|
+
if (!singleSearchKey.value) {
|
|
9223
|
+
if (isSelectDisable.value) {
|
|
9224
|
+
return false;
|
|
9225
|
+
}
|
|
9226
|
+
if (!displayInputValue.value) {
|
|
9227
|
+
return true;
|
|
9228
|
+
} else {
|
|
9229
|
+
return select2 == null ? void 0 : select2.isSelectFocus;
|
|
9230
|
+
}
|
|
9231
|
+
} else {
|
|
9232
|
+
return false;
|
|
9233
|
+
}
|
|
9234
|
+
});
|
|
9131
9235
|
const mergeClearable = computed(() => {
|
|
9132
9236
|
return !isSelectDisable.value && !!(select2 == null ? void 0 : select2.allowClear) && (displayInputValue.value ? true : false);
|
|
9133
9237
|
});
|
|
9134
9238
|
const isDisabledTooltip = computed(() => {
|
|
9135
9239
|
return !isSupportTagsTooltip.value || !!(select2 == null ? void 0 : select2.isOpen);
|
|
9136
9240
|
});
|
|
9241
|
+
const isSupportFilter = computed(() => lodash.exports.isFunction(select2 == null ? void 0 : select2.filter) || typeof (select2 == null ? void 0 : select2.filter) === "boolean" && (select2 == null ? void 0 : select2.filter));
|
|
9137
9242
|
const selectionCls = computed(() => {
|
|
9138
9243
|
return className(ns2.e("selection"), {
|
|
9139
9244
|
[ns2.e("clearable")]: mergeClearable.value,
|
|
9140
|
-
[ns2.em("selection", "error")]: isValidateError.value
|
|
9245
|
+
[ns2.em("selection", "error")]: isValidateError.value,
|
|
9246
|
+
[ns2.em("selection", "gray-style")]: styleType === "gray"
|
|
9141
9247
|
});
|
|
9142
9248
|
});
|
|
9143
9249
|
const inputCls = computed(() => {
|
|
@@ -9148,12 +9254,20 @@ function useSelectContent() {
|
|
|
9148
9254
|
});
|
|
9149
9255
|
const tagSize = computed(() => (select2 == null ? void 0 : select2.selectSize) || "sm");
|
|
9150
9256
|
const placeholder = computed(() => displayInputValue.value ? "" : (select2 == null ? void 0 : select2.placeholder) || t("placeholder"));
|
|
9257
|
+
const singlePlaceholder = computed(() => (select2 == null ? void 0 : select2.placeholder) || t("placeholder"));
|
|
9151
9258
|
const isMultiple = computed(() => !!(select2 == null ? void 0 : select2.multiple));
|
|
9152
9259
|
const handleClear = (e) => {
|
|
9153
9260
|
e.preventDefault();
|
|
9154
9261
|
e.stopPropagation();
|
|
9262
|
+
searchQuery.value = "";
|
|
9263
|
+
singleSearchKey.value = "";
|
|
9155
9264
|
select2 == null ? void 0 : select2.handleClear();
|
|
9156
9265
|
};
|
|
9266
|
+
const onSingleInputWrapClick = () => {
|
|
9267
|
+
if (!(select2 == null ? void 0 : select2.selectDisabled)) {
|
|
9268
|
+
singleInputRef.value.focus();
|
|
9269
|
+
}
|
|
9270
|
+
};
|
|
9157
9271
|
const tagDelete = (data) => {
|
|
9158
9272
|
if (data && (data.value || data.value === 0)) {
|
|
9159
9273
|
select2 == null ? void 0 : select2.tagDelete(data);
|
|
@@ -9163,39 +9277,67 @@ function useSelectContent() {
|
|
|
9163
9277
|
select2 == null ? void 0 : select2.onFocus(e);
|
|
9164
9278
|
};
|
|
9165
9279
|
const onBlur = (e) => {
|
|
9280
|
+
singleSearchKey.value = "";
|
|
9166
9281
|
select2 == null ? void 0 : select2.onBlur(e);
|
|
9167
9282
|
};
|
|
9283
|
+
const onMultipleClick = () => {
|
|
9284
|
+
if (select2 == null ? void 0 : select2.selectDisabled) {
|
|
9285
|
+
return;
|
|
9286
|
+
}
|
|
9287
|
+
if (select2 == null ? void 0 : select2.isOpen) {
|
|
9288
|
+
searchQuery.value = "";
|
|
9289
|
+
select2 == null ? void 0 : select2.onBlur();
|
|
9290
|
+
} else {
|
|
9291
|
+
select2 == null ? void 0 : select2.onFocus();
|
|
9292
|
+
}
|
|
9293
|
+
};
|
|
9294
|
+
const onArrowClick = () => {
|
|
9295
|
+
if (isMultiple.value) {
|
|
9296
|
+
onMultipleClick();
|
|
9297
|
+
}
|
|
9298
|
+
};
|
|
9168
9299
|
const queryFilter = (e) => {
|
|
9169
9300
|
e.preventDefault();
|
|
9170
9301
|
e.stopPropagation();
|
|
9171
9302
|
const query = e.target.value;
|
|
9303
|
+
singleSearchKey.value = query;
|
|
9304
|
+
searchQuery.value = query;
|
|
9172
9305
|
if (!isReadOnly.value && (select2 == null ? void 0 : select2.debounceQueryFilter)) {
|
|
9173
9306
|
select2 == null ? void 0 : select2.debounceQueryFilter(query);
|
|
9174
9307
|
}
|
|
9175
9308
|
};
|
|
9176
9309
|
return {
|
|
9310
|
+
singleInputRef,
|
|
9177
9311
|
searchQuery,
|
|
9312
|
+
singleSearchKey,
|
|
9178
9313
|
selectedData,
|
|
9179
9314
|
isSelectDisable,
|
|
9180
9315
|
isSupportCollapseTags,
|
|
9181
9316
|
isDisabledTooltip,
|
|
9317
|
+
isSupportFilter,
|
|
9182
9318
|
isReadOnly,
|
|
9183
9319
|
selectionCls,
|
|
9184
9320
|
inputCls,
|
|
9185
9321
|
tagSize,
|
|
9186
9322
|
placeholder,
|
|
9323
|
+
singlePlaceholder,
|
|
9324
|
+
singlePlaceholderWidth,
|
|
9187
9325
|
isMultiple,
|
|
9188
9326
|
displayInputValue,
|
|
9327
|
+
isPlaceholderDark,
|
|
9328
|
+
onSingleInputWrapClick,
|
|
9189
9329
|
handleClear,
|
|
9190
9330
|
tagDelete,
|
|
9191
9331
|
onFocus,
|
|
9192
9332
|
onBlur,
|
|
9333
|
+
onMultipleClick,
|
|
9334
|
+
onArrowClick,
|
|
9193
9335
|
queryFilter
|
|
9194
9336
|
};
|
|
9195
9337
|
}
|
|
9196
9338
|
var SelectContent = defineComponent({
|
|
9197
9339
|
name: "SelectContent",
|
|
9198
|
-
setup() {
|
|
9340
|
+
setup(_, ctx2) {
|
|
9199
9341
|
const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
|
|
9200
9342
|
const ns2 = useNamespace$1("select");
|
|
9201
9343
|
const clearCls = computed(() => ({
|
|
@@ -9209,44 +9351,71 @@ var SelectContent = defineComponent({
|
|
|
9209
9351
|
const multipleCls = ns2.e("multiple");
|
|
9210
9352
|
const multipleInputCls = ns2.em("multiple", "input");
|
|
9211
9353
|
const {
|
|
9354
|
+
singleInputRef,
|
|
9212
9355
|
searchQuery,
|
|
9356
|
+
singleSearchKey,
|
|
9213
9357
|
selectedData,
|
|
9214
9358
|
isSelectDisable,
|
|
9215
9359
|
isSupportCollapseTags,
|
|
9216
9360
|
isDisabledTooltip,
|
|
9217
9361
|
isReadOnly,
|
|
9362
|
+
isSupportFilter,
|
|
9218
9363
|
selectionCls,
|
|
9219
9364
|
inputCls,
|
|
9220
9365
|
tagSize,
|
|
9221
9366
|
placeholder,
|
|
9367
|
+
singlePlaceholder,
|
|
9368
|
+
singlePlaceholderWidth,
|
|
9222
9369
|
isMultiple,
|
|
9370
|
+
isPlaceholderDark,
|
|
9223
9371
|
displayInputValue,
|
|
9372
|
+
onSingleInputWrapClick,
|
|
9373
|
+
onMultipleClick,
|
|
9374
|
+
onArrowClick,
|
|
9224
9375
|
handleClear,
|
|
9225
9376
|
tagDelete,
|
|
9226
9377
|
onFocus,
|
|
9227
9378
|
onBlur,
|
|
9228
9379
|
queryFilter
|
|
9229
9380
|
} = useSelectContent();
|
|
9381
|
+
const clearSingleSearchKey = () => {
|
|
9382
|
+
singleSearchKey.value = "";
|
|
9383
|
+
};
|
|
9384
|
+
const clearMultipleSearchKey = () => {
|
|
9385
|
+
searchQuery.value = "";
|
|
9386
|
+
};
|
|
9387
|
+
ctx2.expose({
|
|
9388
|
+
clearSingleSearchKey,
|
|
9389
|
+
clearMultipleSearchKey
|
|
9390
|
+
});
|
|
9230
9391
|
return () => {
|
|
9231
9392
|
return createVNode("div", {
|
|
9232
9393
|
"class": selectionCls.value
|
|
9233
9394
|
}, [isMultiple.value ? createVNode("div", {
|
|
9234
|
-
"class": multipleCls
|
|
9395
|
+
"class": multipleCls,
|
|
9396
|
+
"onClick": onMultipleClick
|
|
9235
9397
|
}, [!isSupportCollapseTags.value && selectedData.value.length >= 1 && selectedData.value.map((item) => createVNode(Tag, {
|
|
9236
|
-
"deletable":
|
|
9398
|
+
"deletable": !(isSelectDisable.value || item.disabled),
|
|
9237
9399
|
"onTagDelete": withModifiers(() => tagDelete(item), ["prevent", "stop"]),
|
|
9238
9400
|
"key": item.value,
|
|
9401
|
+
"maxWidth": "78%",
|
|
9402
|
+
"class": ["multiple-tag", {
|
|
9403
|
+
disabled: isSelectDisable.value || item.disabled
|
|
9404
|
+
}],
|
|
9239
9405
|
"size": tagSize.value
|
|
9240
9406
|
}, {
|
|
9241
9407
|
default: () => [item.name]
|
|
9242
9408
|
})), isSupportCollapseTags.value && selectedData.value.length >= 1 && createVNode(Tag, {
|
|
9243
9409
|
"deletable": true,
|
|
9410
|
+
"maxWidth": "75%",
|
|
9411
|
+
"class": "multiple-tag",
|
|
9244
9412
|
"onTagDelete": withModifiers(() => tagDelete(selectedData.value[0]), ["prevent", "stop"]),
|
|
9245
9413
|
"size": tagSize.value
|
|
9246
9414
|
}, {
|
|
9247
9415
|
default: () => [selectedData.value[0].name]
|
|
9248
9416
|
}), isSupportCollapseTags.value && selectedData.value.length > 1 && createVNode(Popover, {
|
|
9249
9417
|
"trigger": "hover",
|
|
9418
|
+
"auto-update-position": true,
|
|
9250
9419
|
"disabled": isDisabledTooltip.value
|
|
9251
9420
|
}, {
|
|
9252
9421
|
default: () => createVNode(Tag, {
|
|
@@ -9258,39 +9427,49 @@ var SelectContent = defineComponent({
|
|
|
9258
9427
|
"deletable": true,
|
|
9259
9428
|
"onTagDelete": withModifiers(() => tagDelete(item), ["prevent", "stop"]),
|
|
9260
9429
|
"key": item.value,
|
|
9430
|
+
"class": "popover-tag",
|
|
9261
9431
|
"size": tagSize.value
|
|
9262
9432
|
}, {
|
|
9263
9433
|
default: () => [item.name]
|
|
9264
9434
|
}))])
|
|
9265
9435
|
}), createVNode("div", {
|
|
9266
9436
|
"class": multipleInputCls
|
|
9267
|
-
}, [createVNode("input", {
|
|
9437
|
+
}, [withDirectives(createVNode("input", {
|
|
9268
9438
|
"ref": "input",
|
|
9269
9439
|
"value": searchQuery.value,
|
|
9270
9440
|
"type": "text",
|
|
9271
9441
|
"class": inputCls.value,
|
|
9272
9442
|
"placeholder": placeholder.value,
|
|
9273
|
-
"readonly": isReadOnly.value,
|
|
9443
|
+
"readonly": isReadOnly.value || !isSupportFilter.value,
|
|
9274
9444
|
"disabled": isSelectDisable.value,
|
|
9275
|
-
"onInput": queryFilter
|
|
9276
|
-
|
|
9277
|
-
"
|
|
9278
|
-
|
|
9279
|
-
|
|
9280
|
-
"
|
|
9445
|
+
"onInput": queryFilter
|
|
9446
|
+
}, null), [[vShow, !selectedData.value.length || isSupportFilter.value]])])]) : createVNode("div", {
|
|
9447
|
+
"class": "single-inner-input",
|
|
9448
|
+
"onClick": onSingleInputWrapClick
|
|
9449
|
+
}, [!singleSearchKey.value && createVNode("span", {
|
|
9450
|
+
"class": ["input-placeholder", {
|
|
9451
|
+
"placeholder-dark": isPlaceholderDark.value
|
|
9452
|
+
}],
|
|
9453
|
+
"style": {
|
|
9454
|
+
width: singlePlaceholderWidth.value
|
|
9455
|
+
},
|
|
9456
|
+
"title": displayInputValue.value || singlePlaceholder.value
|
|
9457
|
+
}, [displayInputValue.value || singlePlaceholder.value]), withDirectives(createVNode("input", {
|
|
9458
|
+
"ref": singleInputRef,
|
|
9281
9459
|
"type": "text",
|
|
9460
|
+
"onUpdate:modelValue": ($event) => singleSearchKey.value = $event,
|
|
9282
9461
|
"class": inputCls.value,
|
|
9283
|
-
"placeholder": placeholder.value,
|
|
9284
9462
|
"readonly": isReadOnly.value,
|
|
9285
9463
|
"disabled": isSelectDisable.value,
|
|
9286
9464
|
"onFocus": onFocus,
|
|
9287
9465
|
"onBlur": onBlur,
|
|
9288
9466
|
"onInput": queryFilter
|
|
9289
|
-
}, null), createVNode("span", {
|
|
9467
|
+
}, null), [[vModelText, singleSearchKey.value]])]), createVNode("span", {
|
|
9290
9468
|
"onClick": handleClear,
|
|
9291
9469
|
"class": clearCls.value
|
|
9292
9470
|
}, [createVNode(AlertCloseIcon, null, null)]), createVNode("span", {
|
|
9293
|
-
"class": arrowCls.value
|
|
9471
|
+
"class": arrowCls.value,
|
|
9472
|
+
"onClick": onArrowClick
|
|
9294
9473
|
}, [createVNode(SelectArrowIcon, null, null)])]);
|
|
9295
9474
|
};
|
|
9296
9475
|
}
|
|
@@ -9318,11 +9497,38 @@ function useSelectFunction(props, selectRef) {
|
|
|
9318
9497
|
};
|
|
9319
9498
|
return { isSelectFocus, focus, blur };
|
|
9320
9499
|
}
|
|
9500
|
+
function useSelectMenuSize(selectRef, dropdownRef, isOpen) {
|
|
9501
|
+
const originRef = ref();
|
|
9502
|
+
const dropdownWidth = ref(0);
|
|
9503
|
+
let observer;
|
|
9504
|
+
const updateDropdownWidth = () => {
|
|
9505
|
+
var _a;
|
|
9506
|
+
dropdownWidth.value = ((_a = originRef.value) == null ? void 0 : _a.getBoundingClientRect().width) || 0;
|
|
9507
|
+
if (isOpen.value) {
|
|
9508
|
+
dropdownRef.value.updatePosition();
|
|
9509
|
+
}
|
|
9510
|
+
};
|
|
9511
|
+
const watchInputSize = () => {
|
|
9512
|
+
if (window) {
|
|
9513
|
+
observer = new window.ResizeObserver(updateDropdownWidth);
|
|
9514
|
+
observer.observe(originRef.value);
|
|
9515
|
+
}
|
|
9516
|
+
};
|
|
9517
|
+
onMounted(() => {
|
|
9518
|
+
originRef.value = selectRef.value.$el;
|
|
9519
|
+
watchInputSize();
|
|
9520
|
+
updateDropdownWidth();
|
|
9521
|
+
});
|
|
9522
|
+
onBeforeUnmount(() => {
|
|
9523
|
+
observer == null ? void 0 : observer.unobserve(originRef.value);
|
|
9524
|
+
});
|
|
9525
|
+
return { originRef, dropdownWidth };
|
|
9526
|
+
}
|
|
9321
9527
|
var select = "";
|
|
9322
9528
|
var Select = defineComponent({
|
|
9323
9529
|
name: "DSelect",
|
|
9324
9530
|
props: selectProps,
|
|
9325
|
-
emits: ["toggle-change", "value-change", "update:modelValue", "focus", "blur", "remove-tag", "clear"],
|
|
9531
|
+
emits: ["toggle-change", "value-change", "update:modelValue", "focus", "blur", "remove-tag", "clear", "load-more"],
|
|
9326
9532
|
setup(props, ctx2) {
|
|
9327
9533
|
const app = getCurrentInstance();
|
|
9328
9534
|
const t = createI18nTranslate("DSelect", app);
|
|
@@ -9335,7 +9541,6 @@ var Select = defineComponent({
|
|
|
9335
9541
|
const {
|
|
9336
9542
|
selectDisabled,
|
|
9337
9543
|
selectSize,
|
|
9338
|
-
originRef,
|
|
9339
9544
|
dropdownRef,
|
|
9340
9545
|
isOpen,
|
|
9341
9546
|
selectCls,
|
|
@@ -9356,9 +9561,17 @@ var Select = defineComponent({
|
|
|
9356
9561
|
toggleChange,
|
|
9357
9562
|
isShowCreateOption
|
|
9358
9563
|
} = useSelect(props, selectRef, ctx2, focus, blur, isSelectFocus, t);
|
|
9564
|
+
const dropdownContainer = ref();
|
|
9565
|
+
const {
|
|
9566
|
+
originRef,
|
|
9567
|
+
dropdownWidth
|
|
9568
|
+
} = useSelectMenuSize(selectRef, dropdownRef, isOpen);
|
|
9359
9569
|
const scrollbarNs = useNamespace$1("scrollbar");
|
|
9360
9570
|
const ns2 = useNamespace$1("select");
|
|
9361
|
-
const dropdownCls =
|
|
9571
|
+
const dropdownCls = {
|
|
9572
|
+
[ns2.e("dropdown")]: true,
|
|
9573
|
+
[ns2.em("dropdown", "multiple")]: props.multiple
|
|
9574
|
+
};
|
|
9362
9575
|
const listCls = {
|
|
9363
9576
|
[ns2.e("dropdown-list")]: true,
|
|
9364
9577
|
[scrollbarNs.b()]: true
|
|
@@ -9370,32 +9583,29 @@ var Select = defineComponent({
|
|
|
9370
9583
|
toggleChange
|
|
9371
9584
|
});
|
|
9372
9585
|
const isRender = ref(false);
|
|
9373
|
-
|
|
9374
|
-
const dropdownWidth = ref("0");
|
|
9375
|
-
const updateDropdownWidth = () => {
|
|
9376
|
-
var _a;
|
|
9377
|
-
dropdownWidth.value = ((_a = originRef == null ? void 0 : originRef.value) == null ? void 0 : _a.clientWidth) ? originRef.value.clientWidth + "px" : "100%";
|
|
9378
|
-
};
|
|
9379
|
-
watch(selectRef, (val) => {
|
|
9380
|
-
if (val) {
|
|
9381
|
-
originRef.value = val.$el;
|
|
9382
|
-
updateDropdownWidth();
|
|
9383
|
-
}
|
|
9384
|
-
});
|
|
9385
|
-
onMounted(() => {
|
|
9586
|
+
onBeforeMount(() => {
|
|
9386
9587
|
isRender.value = true;
|
|
9387
|
-
updateDropdownWidth();
|
|
9388
|
-
window.addEventListener("resize", updateDropdownWidth);
|
|
9389
9588
|
});
|
|
9390
|
-
|
|
9391
|
-
|
|
9589
|
+
const scrollToBottom = () => {
|
|
9590
|
+
const compareHeight = dropdownContainer.value.scrollHeight - dropdownContainer.value.clientHeight;
|
|
9591
|
+
const scrollTop = dropdownContainer.value.scrollTop;
|
|
9592
|
+
if (scrollTop === compareHeight) {
|
|
9593
|
+
ctx2.emit("load-more");
|
|
9594
|
+
}
|
|
9595
|
+
};
|
|
9596
|
+
onMounted(() => {
|
|
9597
|
+
nextTick(() => {
|
|
9598
|
+
dropdownContainer.value.addEventListener("scroll", scrollToBottom);
|
|
9599
|
+
});
|
|
9392
9600
|
});
|
|
9393
9601
|
provide(SELECT_TOKEN, reactive(__spreadProps(__spreadValues({}, toRefs(props)), {
|
|
9394
9602
|
selectDisabled,
|
|
9395
9603
|
selectSize,
|
|
9396
9604
|
isOpen,
|
|
9605
|
+
isSelectFocus,
|
|
9397
9606
|
selectedOptions,
|
|
9398
9607
|
filterQuery,
|
|
9608
|
+
dropdownWidth,
|
|
9399
9609
|
valueChange,
|
|
9400
9610
|
handleClear,
|
|
9401
9611
|
updateInjectOptions,
|
|
@@ -9409,7 +9619,7 @@ var Select = defineComponent({
|
|
|
9409
9619
|
"class": selectCls.value,
|
|
9410
9620
|
"onClick": withModifiers(() => {
|
|
9411
9621
|
toggleChange(!isOpen.value);
|
|
9412
|
-
}, [
|
|
9622
|
+
}, [])
|
|
9413
9623
|
}, [createVNode(SelectContent, {
|
|
9414
9624
|
"ref": selectRef
|
|
9415
9625
|
}, null), createVNode(Teleport, {
|
|
@@ -9423,9 +9633,9 @@ var Select = defineComponent({
|
|
|
9423
9633
|
"onUpdate:modelValue": ($event) => isRender.value = $event,
|
|
9424
9634
|
"ref": dropdownRef,
|
|
9425
9635
|
"origin": originRef.value,
|
|
9426
|
-
"align": "start",
|
|
9427
9636
|
"offset": 4,
|
|
9428
|
-
"
|
|
9637
|
+
"place-strategy": "no-space",
|
|
9638
|
+
"position": props.position,
|
|
9429
9639
|
"style": {
|
|
9430
9640
|
visibility: isOpen.value ? "visible" : "hidden",
|
|
9431
9641
|
"z-index": isOpen.value ? "var(--devui-z-index-dropdown, 1052)" : -1
|
|
@@ -9436,11 +9646,15 @@ var Select = defineComponent({
|
|
|
9436
9646
|
return [createVNode("div", {
|
|
9437
9647
|
"class": dropdownCls,
|
|
9438
9648
|
"style": {
|
|
9439
|
-
width: `${dropdownWidth.value}`,
|
|
9649
|
+
width: `${dropdownWidth.value}px`,
|
|
9440
9650
|
visibility: isOpen.value ? "visible" : "hidden"
|
|
9441
9651
|
}
|
|
9442
9652
|
}, [withDirectives(createVNode("ul", {
|
|
9443
|
-
"class": listCls
|
|
9653
|
+
"class": listCls,
|
|
9654
|
+
"style": {
|
|
9655
|
+
padding: isShowEmptyText.value ? "0" : "12px"
|
|
9656
|
+
},
|
|
9657
|
+
"ref": dropdownContainer
|
|
9444
9658
|
}, [isShowCreateOption.value && createVNode(Option, {
|
|
9445
9659
|
"value": filterQuery.value,
|
|
9446
9660
|
"name": filterQuery.value,
|
|
@@ -9459,7 +9673,8 @@ var Select = defineComponent({
|
|
|
9459
9673
|
default: () => [props.multiple ? createVNode(Checkbox, {
|
|
9460
9674
|
"modelValue": item._checked,
|
|
9461
9675
|
"label": item.name,
|
|
9462
|
-
"disabled": isDisabled(item)
|
|
9676
|
+
"disabled": isDisabled(item),
|
|
9677
|
+
"class": "select-checkbox"
|
|
9463
9678
|
}, null) : item.name || item.value]
|
|
9464
9679
|
}))]), [[vShow, !isLoading.value]]), isShowEmptyText.value && createVNode("div", null, [((_c = ctx2.slots) == null ? void 0 : _c.empty) && ctx2.slots.empty(), !((_d = ctx2.slots) == null ? void 0 : _d.empty) && createVNode("p", {
|
|
9465
9680
|
"class": dropdownEmptyCls
|
|
@@ -9715,7 +9930,7 @@ var ConfigMenu = defineComponent({
|
|
|
9715
9930
|
isShowConfig,
|
|
9716
9931
|
$slots
|
|
9717
9932
|
} = this;
|
|
9718
|
-
const ns2 = useNamespace
|
|
9933
|
+
const ns2 = useNamespace("pagination");
|
|
9719
9934
|
return withDirectives(createVNode("div", {
|
|
9720
9935
|
"class": ns2.e("config"),
|
|
9721
9936
|
"ref": "paginationConfig"
|
|
@@ -9805,7 +10020,7 @@ var JumpPage = defineComponent({
|
|
|
9805
10020
|
jump,
|
|
9806
10021
|
showJumpButton
|
|
9807
10022
|
} = this;
|
|
9808
|
-
const ns2 = useNamespace
|
|
10023
|
+
const ns2 = useNamespace("pagination");
|
|
9809
10024
|
const inputProps = {
|
|
9810
10025
|
class: [ns2.e("input"), size ? ns2.em("input", size) : ""],
|
|
9811
10026
|
size,
|
|
@@ -9927,7 +10142,7 @@ var PageNumBtn = defineComponent({
|
|
|
9927
10142
|
nextChange,
|
|
9928
10143
|
showTruePageIndex
|
|
9929
10144
|
} = this;
|
|
9930
|
-
const ns2 = useNamespace
|
|
10145
|
+
const ns2 = useNamespace("pagination");
|
|
9931
10146
|
return createVNode("ul", {
|
|
9932
10147
|
"class": [ns2.e("list"), size ? ns2.m(size) : ""]
|
|
9933
10148
|
}, [createVNode("li", {
|
|
@@ -10071,7 +10286,7 @@ var svgIcon = defineComponent({
|
|
|
10071
10286
|
color,
|
|
10072
10287
|
size
|
|
10073
10288
|
} = toRefs(props);
|
|
10074
|
-
const ns2 = useNamespace
|
|
10289
|
+
const ns2 = useNamespace("svg-icon");
|
|
10075
10290
|
const iconName = computed(() => `#icon-${name.value}`);
|
|
10076
10291
|
const iconSize = computed(() => {
|
|
10077
10292
|
return typeof size.value === "number" ? `${size.value}px` : size.value;
|
|
@@ -10100,7 +10315,7 @@ function useIconDom(props, ctx2) {
|
|
|
10100
10315
|
classPrefix,
|
|
10101
10316
|
rotate
|
|
10102
10317
|
} = toRefs(props);
|
|
10103
|
-
const ns2 = useNamespace
|
|
10318
|
+
const ns2 = useNamespace("icon");
|
|
10104
10319
|
const iconSize = computed(() => {
|
|
10105
10320
|
return typeof size.value === "number" ? `${size.value}px` : size.value;
|
|
10106
10321
|
});
|
|
@@ -10158,7 +10373,7 @@ var Icon = defineComponent({
|
|
|
10158
10373
|
const {
|
|
10159
10374
|
iconDom
|
|
10160
10375
|
} = useIconDom(props, ctx2);
|
|
10161
|
-
const ns2 = useNamespace
|
|
10376
|
+
const ns2 = useNamespace("icon");
|
|
10162
10377
|
const wrapClassed = computed(() => ({
|
|
10163
10378
|
[ns2.e("container")]: true,
|
|
10164
10379
|
[ns2.m("disabled")]: disabled.value,
|
|
@@ -10184,7 +10399,7 @@ var iconGroup = "";
|
|
|
10184
10399
|
defineComponent({
|
|
10185
10400
|
name: "DIconGroup",
|
|
10186
10401
|
setup(_, ctx2) {
|
|
10187
|
-
const ns2 = useNamespace
|
|
10402
|
+
const ns2 = useNamespace("icon-group");
|
|
10188
10403
|
return () => {
|
|
10189
10404
|
var _a, _b;
|
|
10190
10405
|
return createVNode("div", {
|
|
@@ -10419,7 +10634,7 @@ var Dropdown = defineComponent({
|
|
|
10419
10634
|
const id = `dropdown_${dropdownId++}`;
|
|
10420
10635
|
const isOpen = ref(false);
|
|
10421
10636
|
const currentPosition = ref("bottom");
|
|
10422
|
-
const ns2 = useNamespace
|
|
10637
|
+
const ns2 = useNamespace("dropdown");
|
|
10423
10638
|
provide(POPPER_TRIGGER_TOKEN, origin);
|
|
10424
10639
|
useDropdownEvent({
|
|
10425
10640
|
id,
|
|
@@ -10539,7 +10754,7 @@ defineComponent({
|
|
|
10539
10754
|
overlayClass
|
|
10540
10755
|
} = toRefs(props);
|
|
10541
10756
|
const dropdownMenuRef = ref(null);
|
|
10542
|
-
const ns2 = useNamespace
|
|
10757
|
+
const ns2 = useNamespace("dropdown");
|
|
10543
10758
|
onClickOutside(dropdownMenuRef, (value) => {
|
|
10544
10759
|
var _a, _b;
|
|
10545
10760
|
if (((_a = clickOutside.value) == null ? void 0 : _a.call(clickOutside)) && !((_b = origin == null ? void 0 : origin.value) == null ? void 0 : _b.contains(value.target))) {
|
|
@@ -10584,7 +10799,7 @@ defineComponent({
|
|
|
10584
10799
|
});
|
|
10585
10800
|
var PageSize = defineComponent({
|
|
10586
10801
|
setup() {
|
|
10587
|
-
const ns2 = useNamespace
|
|
10802
|
+
const ns2 = useNamespace("pagination");
|
|
10588
10803
|
const paginationContext = inject(paginationInjectionKey);
|
|
10589
10804
|
const iconRotate = ref(0);
|
|
10590
10805
|
const {
|
|
@@ -10662,7 +10877,7 @@ var Pagination = defineComponent({
|
|
|
10662
10877
|
showJumpButton,
|
|
10663
10878
|
haveConfigMenu
|
|
10664
10879
|
} = toRefs(props);
|
|
10665
|
-
const ns2 = useNamespace
|
|
10880
|
+
const ns2 = useNamespace("pagination");
|
|
10666
10881
|
const totalPages = computed(() => Math.ceil(props.total / props.pageSize));
|
|
10667
10882
|
const litePageOptions = computed(() => liteSelectOptions(totalPages.value));
|
|
10668
10883
|
const cursor = computed({
|