vue-devui 1.5.12 → 1.5.13-hotfix.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +155 -89
- package/pagination/index.umd.js +13 -13
- 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 +148 -82
- package/select/index.umd.js +11 -11
- 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 +148 -82
- package/time-select/index.umd.js +17 -17
- 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/vue-devui.d.ts +2 -1
- package/vue-devui.es.js +202 -70
- package/vue-devui.umd.js +78 -78
package/form/index.es.js
CHANGED
|
@@ -30,6 +30,7 @@ var __objRest = (source, exclude) => {
|
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
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 } from "vue";
|
|
33
|
+
import "clipboard";
|
|
33
34
|
import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
|
|
34
35
|
const formProps = {
|
|
35
36
|
data: {
|
|
@@ -77,10 +78,38 @@ const formProps = {
|
|
|
77
78
|
hideRequiredMark: {
|
|
78
79
|
type: Boolean,
|
|
79
80
|
default: false
|
|
81
|
+
},
|
|
82
|
+
styleType: {
|
|
83
|
+
type: String,
|
|
84
|
+
default: "default"
|
|
85
|
+
},
|
|
86
|
+
appendToBodyScrollStrategy: {
|
|
87
|
+
type: String,
|
|
88
|
+
default: "reposition"
|
|
80
89
|
}
|
|
81
90
|
};
|
|
82
91
|
const FORM_TOKEN = Symbol("dForm");
|
|
83
|
-
|
|
92
|
+
const STYLE_TOKEN = Symbol("dForm");
|
|
93
|
+
function lockScroll() {
|
|
94
|
+
if (document.documentElement.scrollHeight > document.documentElement.clientHeight) {
|
|
95
|
+
const scrollTop = document.documentElement.scrollTop;
|
|
96
|
+
const style = document.documentElement.getAttribute("style");
|
|
97
|
+
document.documentElement.style.position = "fixed";
|
|
98
|
+
document.documentElement.style.top = `-${scrollTop}px`;
|
|
99
|
+
document.documentElement.style.width = document.documentElement.style.width || "100%";
|
|
100
|
+
document.documentElement.style.overflowY = "scroll";
|
|
101
|
+
return () => {
|
|
102
|
+
if (style) {
|
|
103
|
+
document.documentElement.setAttribute("style", style);
|
|
104
|
+
} else {
|
|
105
|
+
document.documentElement.removeAttribute("style");
|
|
106
|
+
}
|
|
107
|
+
document.documentElement.scrollTop = scrollTop;
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
function createBem$1(namespace, element, modifier) {
|
|
84
113
|
let cls = namespace;
|
|
85
114
|
if (element) {
|
|
86
115
|
cls += `__${element}`;
|
|
@@ -90,12 +119,12 @@ function createBem(namespace, element, modifier) {
|
|
|
90
119
|
}
|
|
91
120
|
return cls;
|
|
92
121
|
}
|
|
93
|
-
function useNamespace(block, needDot = false) {
|
|
122
|
+
function useNamespace$1(block, needDot = false) {
|
|
94
123
|
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
95
|
-
const b = () => createBem(namespace);
|
|
96
|
-
const e = (element) => element ? createBem(namespace, element) : "";
|
|
97
|
-
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
98
|
-
const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
|
|
124
|
+
const b = () => createBem$1(namespace);
|
|
125
|
+
const e = (element) => element ? createBem$1(namespace, element) : "";
|
|
126
|
+
const m = (modifier) => modifier ? createBem$1(namespace, "", modifier) : "";
|
|
127
|
+
const em = (element, modifier) => element && modifier ? createBem$1(namespace, element, modifier) : "";
|
|
99
128
|
return {
|
|
100
129
|
b,
|
|
101
130
|
e,
|
|
@@ -1293,7 +1322,7 @@ var lodash = { exports: {} };
|
|
|
1293
1322
|
if (typeof func != "function") {
|
|
1294
1323
|
throw new TypeError2(FUNC_ERROR_TEXT);
|
|
1295
1324
|
}
|
|
1296
|
-
return
|
|
1325
|
+
return setTimeout2(function() {
|
|
1297
1326
|
func.apply(undefined$1, args);
|
|
1298
1327
|
}, wait);
|
|
1299
1328
|
}
|
|
@@ -3102,7 +3131,7 @@ var lodash = { exports: {} };
|
|
|
3102
3131
|
return object4[key];
|
|
3103
3132
|
}
|
|
3104
3133
|
var setData = shortOut(baseSetData);
|
|
3105
|
-
var
|
|
3134
|
+
var setTimeout2 = ctxSetTimeout || function(func, wait) {
|
|
3106
3135
|
return root.setTimeout(func, wait);
|
|
3107
3136
|
};
|
|
3108
3137
|
var setToString = shortOut(baseSetToString);
|
|
@@ -3894,7 +3923,7 @@ var lodash = { exports: {} };
|
|
|
3894
3923
|
}
|
|
3895
3924
|
function leadingEdge(time) {
|
|
3896
3925
|
lastInvokeTime = time;
|
|
3897
|
-
timerId =
|
|
3926
|
+
timerId = setTimeout2(timerExpired, wait);
|
|
3898
3927
|
return leading ? invokeFunc(time) : result2;
|
|
3899
3928
|
}
|
|
3900
3929
|
function remainingWait(time) {
|
|
@@ -3910,7 +3939,7 @@ var lodash = { exports: {} };
|
|
|
3910
3939
|
if (shouldInvoke(time)) {
|
|
3911
3940
|
return trailingEdge(time);
|
|
3912
3941
|
}
|
|
3913
|
-
timerId =
|
|
3942
|
+
timerId = setTimeout2(timerExpired, remainingWait(time));
|
|
3914
3943
|
}
|
|
3915
3944
|
function trailingEdge(time) {
|
|
3916
3945
|
timerId = undefined$1;
|
|
@@ -3941,12 +3970,12 @@ var lodash = { exports: {} };
|
|
|
3941
3970
|
}
|
|
3942
3971
|
if (maxing) {
|
|
3943
3972
|
clearTimeout(timerId);
|
|
3944
|
-
timerId =
|
|
3973
|
+
timerId = setTimeout2(timerExpired, wait);
|
|
3945
3974
|
return invokeFunc(lastCallTime);
|
|
3946
3975
|
}
|
|
3947
3976
|
}
|
|
3948
3977
|
if (timerId === undefined$1) {
|
|
3949
|
-
timerId =
|
|
3978
|
+
timerId = setTimeout2(timerExpired, wait);
|
|
3950
3979
|
}
|
|
3951
3980
|
return result2;
|
|
3952
3981
|
}
|
|
@@ -5582,7 +5611,7 @@ var Form = defineComponent({
|
|
|
5582
5611
|
props: formProps,
|
|
5583
5612
|
emits: ["validate"],
|
|
5584
5613
|
setup(props, ctx) {
|
|
5585
|
-
const ns2 = useNamespace("form");
|
|
5614
|
+
const ns2 = useNamespace$1("form");
|
|
5586
5615
|
const {
|
|
5587
5616
|
itemContexts,
|
|
5588
5617
|
addItemContext,
|
|
@@ -5609,6 +5638,7 @@ var Form = defineComponent({
|
|
|
5609
5638
|
addItemContext,
|
|
5610
5639
|
removeItemContext
|
|
5611
5640
|
})));
|
|
5641
|
+
provide(STYLE_TOKEN, props.styleType);
|
|
5612
5642
|
ctx.expose({
|
|
5613
5643
|
validate,
|
|
5614
5644
|
validateFields,
|
|
@@ -5650,7 +5680,7 @@ const formItemProps = {
|
|
|
5650
5680
|
default: void 0
|
|
5651
5681
|
},
|
|
5652
5682
|
helpTips: {
|
|
5653
|
-
type: String,
|
|
5683
|
+
type: [String, Object],
|
|
5654
5684
|
default: ""
|
|
5655
5685
|
},
|
|
5656
5686
|
feedbackStatus: {
|
|
@@ -5663,12 +5693,6 @@ const formItemProps = {
|
|
|
5663
5693
|
};
|
|
5664
5694
|
const FORM_ITEM_TOKEN = Symbol("dFormItem");
|
|
5665
5695
|
const LABEL_DATA = Symbol("labelData");
|
|
5666
|
-
const formLabelProps = {
|
|
5667
|
-
helpTips: {
|
|
5668
|
-
type: String,
|
|
5669
|
-
default: ""
|
|
5670
|
-
}
|
|
5671
|
-
};
|
|
5672
5696
|
const fixedOverlayProps = {
|
|
5673
5697
|
modelValue: {
|
|
5674
5698
|
type: Boolean,
|
|
@@ -5683,25 +5707,6 @@ const fixedOverlayProps = {
|
|
|
5683
5707
|
default: true
|
|
5684
5708
|
}
|
|
5685
5709
|
};
|
|
5686
|
-
function lockScroll() {
|
|
5687
|
-
if (document.documentElement.scrollHeight > document.documentElement.clientHeight) {
|
|
5688
|
-
const scrollTop = document.documentElement.scrollTop;
|
|
5689
|
-
const style = document.documentElement.getAttribute("style");
|
|
5690
|
-
document.documentElement.style.position = "fixed";
|
|
5691
|
-
document.documentElement.style.top = `-${scrollTop}px`;
|
|
5692
|
-
document.documentElement.style.width = document.documentElement.style.width || "100%";
|
|
5693
|
-
document.documentElement.style.overflowY = "scroll";
|
|
5694
|
-
return () => {
|
|
5695
|
-
if (style) {
|
|
5696
|
-
document.documentElement.setAttribute("style", style);
|
|
5697
|
-
} else {
|
|
5698
|
-
document.documentElement.removeAttribute("style");
|
|
5699
|
-
}
|
|
5700
|
-
document.documentElement.scrollTop = scrollTop;
|
|
5701
|
-
};
|
|
5702
|
-
}
|
|
5703
|
-
return;
|
|
5704
|
-
}
|
|
5705
5710
|
function useFixedOverlay(props, ctx) {
|
|
5706
5711
|
let lockScrollCb;
|
|
5707
5712
|
const onClick = (event) => {
|
|
@@ -5724,6 +5729,29 @@ function useFixedOverlay(props, ctx) {
|
|
|
5724
5729
|
onUnmounted(removeBodyAdditions);
|
|
5725
5730
|
return { onClick };
|
|
5726
5731
|
}
|
|
5732
|
+
function createBem(namespace, element, modifier) {
|
|
5733
|
+
let cls = namespace;
|
|
5734
|
+
if (element) {
|
|
5735
|
+
cls += `__${element}`;
|
|
5736
|
+
}
|
|
5737
|
+
if (modifier) {
|
|
5738
|
+
cls += `--${modifier}`;
|
|
5739
|
+
}
|
|
5740
|
+
return cls;
|
|
5741
|
+
}
|
|
5742
|
+
function useNamespace(block, needDot = false) {
|
|
5743
|
+
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
5744
|
+
const b = () => createBem(namespace);
|
|
5745
|
+
const e = (element) => element ? createBem(namespace, element) : "";
|
|
5746
|
+
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
5747
|
+
const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
|
|
5748
|
+
return {
|
|
5749
|
+
b,
|
|
5750
|
+
e,
|
|
5751
|
+
m,
|
|
5752
|
+
em
|
|
5753
|
+
};
|
|
5754
|
+
}
|
|
5727
5755
|
var fixedOverlay = "";
|
|
5728
5756
|
defineComponent({
|
|
5729
5757
|
name: "DFixedOverlay",
|
|
@@ -6388,7 +6416,13 @@ function useFormLabel() {
|
|
|
6388
6416
|
const formContext = inject(FORM_TOKEN);
|
|
6389
6417
|
const formItemContext = inject(FORM_ITEM_TOKEN);
|
|
6390
6418
|
const labelData = inject(LABEL_DATA);
|
|
6391
|
-
const ns2 = useNamespace("form");
|
|
6419
|
+
const ns2 = useNamespace$1("form");
|
|
6420
|
+
const defaultTipsPopover = {
|
|
6421
|
+
content: "",
|
|
6422
|
+
position: ["top"],
|
|
6423
|
+
trigger: "hover",
|
|
6424
|
+
popType: "info"
|
|
6425
|
+
};
|
|
6392
6426
|
const labelClasses = computed(() => ({
|
|
6393
6427
|
[`${ns2.e("label")}`]: true,
|
|
6394
6428
|
[`${ns2.em("label", "vertical")}`]: labelData.value.layout === "vertical",
|
|
@@ -6400,17 +6434,24 @@ function useFormLabel() {
|
|
|
6400
6434
|
[`${ns2.em("label", "required")}`]: formItemContext.isRequired,
|
|
6401
6435
|
[`${ns2.em("label", "required-hide")}`]: formItemContext.isRequired && formContext.hideRequiredMark
|
|
6402
6436
|
}));
|
|
6403
|
-
|
|
6437
|
+
const tipsPopover = computed(() => {
|
|
6438
|
+
if (typeof labelData.value.helpTips === "string") {
|
|
6439
|
+
return __spreadProps(__spreadValues({}, defaultTipsPopover), { content: labelData.value.helpTips });
|
|
6440
|
+
} else {
|
|
6441
|
+
return __spreadValues(__spreadValues({}, defaultTipsPopover), labelData.value.helpTips);
|
|
6442
|
+
}
|
|
6443
|
+
});
|
|
6444
|
+
return { labelClasses, labelInnerClasses, tipsPopover };
|
|
6404
6445
|
}
|
|
6405
6446
|
var formLabel = "";
|
|
6406
6447
|
var FormLabel = defineComponent({
|
|
6407
6448
|
name: "DFormLabel",
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
const ns2 = useNamespace("form");
|
|
6449
|
+
setup(_, ctx) {
|
|
6450
|
+
const ns2 = useNamespace$1("form");
|
|
6411
6451
|
const {
|
|
6412
6452
|
labelClasses,
|
|
6413
|
-
labelInnerClasses
|
|
6453
|
+
labelInnerClasses,
|
|
6454
|
+
tipsPopover
|
|
6414
6455
|
} = useFormLabel();
|
|
6415
6456
|
return () => {
|
|
6416
6457
|
var _a, _b;
|
|
@@ -6418,12 +6459,9 @@ var FormLabel = defineComponent({
|
|
|
6418
6459
|
"class": labelClasses.value
|
|
6419
6460
|
}, [createVNode("span", {
|
|
6420
6461
|
"class": labelInnerClasses.value
|
|
6421
|
-
}, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)]),
|
|
6422
|
-
"
|
|
6423
|
-
|
|
6424
|
-
"trigger": "hover",
|
|
6425
|
-
"pop-type": "info"
|
|
6426
|
-
}, {
|
|
6462
|
+
}, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)]), tipsPopover.value.content && createVNode(Popover, mergeProps({
|
|
6463
|
+
"class": ns2.e("label-tips-popover")
|
|
6464
|
+
}, tipsPopover.value), {
|
|
6427
6465
|
default: () => [createVNode(HelpTipsIcon, {
|
|
6428
6466
|
"class": ns2.e("label-help")
|
|
6429
6467
|
}, null), createTextVNode(",")]
|
|
@@ -6442,7 +6480,7 @@ const formControlProps = {
|
|
|
6442
6480
|
};
|
|
6443
6481
|
function useFormControl(props) {
|
|
6444
6482
|
const labelData = inject(LABEL_DATA);
|
|
6445
|
-
const ns2 = useNamespace("form");
|
|
6483
|
+
const ns2 = useNamespace$1("form");
|
|
6446
6484
|
const { feedbackStatus } = toRefs(props);
|
|
6447
6485
|
const controlClasses = computed(() => ({
|
|
6448
6486
|
[ns2.e("control")]: true,
|
|
@@ -6454,7 +6492,7 @@ function useFormControl(props) {
|
|
|
6454
6492
|
[ns2.em("control-container", "has-feedback")]: Boolean(feedbackStatus == null ? void 0 : feedbackStatus.value),
|
|
6455
6493
|
[ns2.em("control-container", "feedback-error")]: Boolean((feedbackStatus == null ? void 0 : feedbackStatus.value) === "error")
|
|
6456
6494
|
}));
|
|
6457
|
-
return { controlClasses, controlContainerClasses };
|
|
6495
|
+
return { controlClasses, controlContainerClasses, labelData };
|
|
6458
6496
|
}
|
|
6459
6497
|
function useFormControlValidate() {
|
|
6460
6498
|
const formItemContext = inject(FORM_ITEM_TOKEN);
|
|
@@ -6471,11 +6509,15 @@ var FormControl = defineComponent({
|
|
|
6471
6509
|
name: "DFormControl",
|
|
6472
6510
|
props: formControlProps,
|
|
6473
6511
|
setup(props, ctx) {
|
|
6512
|
+
const formContext = inject(FORM_TOKEN);
|
|
6474
6513
|
const formControl2 = ref();
|
|
6475
|
-
const
|
|
6514
|
+
const popoverRef = ref();
|
|
6515
|
+
const ns2 = useNamespace$1("form");
|
|
6516
|
+
const showPopoverClick = ref(true);
|
|
6476
6517
|
const {
|
|
6477
6518
|
controlClasses,
|
|
6478
|
-
controlContainerClasses
|
|
6519
|
+
controlContainerClasses,
|
|
6520
|
+
labelData
|
|
6479
6521
|
} = useFormControl(props);
|
|
6480
6522
|
const {
|
|
6481
6523
|
feedbackStatus,
|
|
@@ -6485,17 +6527,52 @@ var FormControl = defineComponent({
|
|
|
6485
6527
|
errorMessage,
|
|
6486
6528
|
popPosition
|
|
6487
6529
|
} = useFormControlValidate();
|
|
6530
|
+
const align = computed(() => {
|
|
6531
|
+
var _a, _b;
|
|
6532
|
+
if ((_a = popPosition.value) == null ? void 0 : _a.some((item) => item.includes("start"))) {
|
|
6533
|
+
return "start";
|
|
6534
|
+
}
|
|
6535
|
+
if ((_b = popPosition.value) == null ? void 0 : _b.some((item) => item.includes("end"))) {
|
|
6536
|
+
return "end";
|
|
6537
|
+
}
|
|
6538
|
+
return void 0;
|
|
6539
|
+
});
|
|
6540
|
+
const onDocumentClick = (e) => {
|
|
6541
|
+
const composedPath = e.composedPath();
|
|
6542
|
+
if (composedPath.includes(popoverRef.value.triggerEl)) {
|
|
6543
|
+
showPopoverClick.value = true;
|
|
6544
|
+
} else {
|
|
6545
|
+
showPopoverClick.value = false;
|
|
6546
|
+
}
|
|
6547
|
+
};
|
|
6548
|
+
watch(showPopover, (val) => {
|
|
6549
|
+
if (val) {
|
|
6550
|
+
setTimeout(() => {
|
|
6551
|
+
document.addEventListener("click", onDocumentClick);
|
|
6552
|
+
});
|
|
6553
|
+
} else {
|
|
6554
|
+
showPopoverClick.value = true;
|
|
6555
|
+
document.removeEventListener("click", onDocumentClick);
|
|
6556
|
+
}
|
|
6557
|
+
});
|
|
6558
|
+
onUnmounted(() => {
|
|
6559
|
+
document.removeEventListener("click", onDocumentClick);
|
|
6560
|
+
});
|
|
6488
6561
|
return () => createVNode("div", {
|
|
6489
6562
|
"class": controlClasses.value,
|
|
6490
6563
|
"ref": formControl2
|
|
6491
6564
|
}, [createVNode("div", {
|
|
6492
6565
|
"class": controlContainerClasses.value
|
|
6493
6566
|
}, [createVNode(Popover, {
|
|
6494
|
-
"
|
|
6567
|
+
"ref": popoverRef,
|
|
6568
|
+
"is-open": showPopover.value && showPopoverClick.value,
|
|
6495
6569
|
"trigger": "manually",
|
|
6496
6570
|
"content": errorMessage.value,
|
|
6497
6571
|
"pop-type": "error",
|
|
6498
|
-
"position": popPosition.value
|
|
6572
|
+
"position": popPosition.value,
|
|
6573
|
+
"align": align.value,
|
|
6574
|
+
"scroll-element": "auto",
|
|
6575
|
+
"append-to-body-scroll-strategy": formContext.appendToBodyScrollStrategy
|
|
6499
6576
|
}, {
|
|
6500
6577
|
default: () => {
|
|
6501
6578
|
var _a, _b;
|
|
@@ -6507,7 +6584,7 @@ var FormControl = defineComponent({
|
|
|
6507
6584
|
"class": ns2.e("control-info")
|
|
6508
6585
|
}, [showMessage.value && createVNode("div", {
|
|
6509
6586
|
"class": "error-message"
|
|
6510
|
-
}, [errorMessage.value]), props.extraInfo && createVNode("div", {
|
|
6587
|
+
}, [errorMessage.value]), labelData.value.formItemCtx.slots.extraInfo ? labelData.value.formItemCtx.slots.extraInfo() : props.extraInfo && createVNode("div", {
|
|
6511
6588
|
"class": ns2.e("control-extra")
|
|
6512
6589
|
}, [props.extraInfo])])]);
|
|
6513
6590
|
}
|
|
@@ -7526,7 +7603,7 @@ function getFieldValue(obj, path) {
|
|
|
7526
7603
|
}
|
|
7527
7604
|
function useFormItem(messageType, _rules, validateState) {
|
|
7528
7605
|
const formContext = inject(FORM_TOKEN);
|
|
7529
|
-
const ns2 = useNamespace("form");
|
|
7606
|
+
const ns2 = useNamespace$1("form");
|
|
7530
7607
|
const itemClasses = computed(() => ({
|
|
7531
7608
|
[`${ns2.em("item", "horizontal")}`]: formContext.layout === "horizontal",
|
|
7532
7609
|
[`${ns2.em("item", "vertical")}`]: formContext.layout === "vertical",
|
|
@@ -7690,7 +7767,9 @@ var FormItem = defineComponent({
|
|
|
7690
7767
|
const labelData = computed(() => ({
|
|
7691
7768
|
layout: formContext.layout,
|
|
7692
7769
|
labelSize: formContext.labelSize,
|
|
7693
|
-
labelAlign: formContext.labelAlign
|
|
7770
|
+
labelAlign: formContext.labelAlign,
|
|
7771
|
+
helpTips: helpTips.value,
|
|
7772
|
+
formItemCtx: ctx
|
|
7694
7773
|
}));
|
|
7695
7774
|
provide(LABEL_DATA, labelData);
|
|
7696
7775
|
const context = reactive(__spreadProps(__spreadValues({}, otherProps), {
|
|
@@ -7706,6 +7785,7 @@ var FormItem = defineComponent({
|
|
|
7706
7785
|
}));
|
|
7707
7786
|
provide(FORM_ITEM_TOKEN, context);
|
|
7708
7787
|
ctx.expose({
|
|
7788
|
+
validate,
|
|
7709
7789
|
resetField,
|
|
7710
7790
|
clearValidate
|
|
7711
7791
|
});
|
|
@@ -7719,9 +7799,7 @@ var FormItem = defineComponent({
|
|
|
7719
7799
|
});
|
|
7720
7800
|
return () => createVNode("div", {
|
|
7721
7801
|
"class": itemClasses.value
|
|
7722
|
-
}, [createVNode(FormLabel, {
|
|
7723
|
-
"help-tips": helpTips.value
|
|
7724
|
-
}, {
|
|
7802
|
+
}, [createVNode(FormLabel, null, {
|
|
7725
7803
|
default: () => [ctx.slots.label ? ctx.slots.label() : label == null ? void 0 : label.value]
|
|
7726
7804
|
}), createVNode(FormControl, {
|
|
7727
7805
|
"feedback-status": feedbackStatus == null ? void 0 : feedbackStatus.value,
|
|
@@ -7766,4 +7844,4 @@ var index = {
|
|
|
7766
7844
|
app.component(FormOperation.name, FormOperation);
|
|
7767
7845
|
}
|
|
7768
7846
|
};
|
|
7769
|
-
export { FORM_ITEM_TOKEN, FORM_TOKEN, Form, FormItem, FormOperation, LABEL_DATA, index as default, formItemProps, formProps };
|
|
7847
|
+
export { FORM_ITEM_TOKEN, FORM_TOKEN, Form, FormItem, FormOperation, LABEL_DATA, STYLE_TOKEN, index as default, formControlProps, formItemProps, formProps };
|