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
|
@@ -34,6 +34,7 @@ var __publicField = (obj, key, value) => {
|
|
|
34
34
|
return value;
|
|
35
35
|
};
|
|
36
36
|
import { ref, nextTick, defineComponent, watch, provide, reactive, toRefs, createVNode, onUnmounted, Transition, mergeProps, unref, withModifiers, Comment, Text, h, Fragment, inject, withDirectives, cloneVNode, computed, onMounted, Teleport, createTextVNode, onBeforeUnmount, render, getCurrentInstance, resolveDirective, vShow, resolveDynamicComponent, isVNode } from "vue";
|
|
37
|
+
import "clipboard";
|
|
37
38
|
import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
|
|
38
39
|
const defaultFormatter = (item) => {
|
|
39
40
|
if (typeof item === "string") {
|
|
@@ -469,10 +470,39 @@ const formProps = {
|
|
|
469
470
|
hideRequiredMark: {
|
|
470
471
|
type: Boolean,
|
|
471
472
|
default: false
|
|
473
|
+
},
|
|
474
|
+
styleType: {
|
|
475
|
+
type: String,
|
|
476
|
+
default: "default"
|
|
477
|
+
},
|
|
478
|
+
appendToBodyScrollStrategy: {
|
|
479
|
+
type: String,
|
|
480
|
+
default: "reposition"
|
|
472
481
|
}
|
|
473
482
|
};
|
|
474
483
|
const FORM_TOKEN = Symbol("dForm");
|
|
475
|
-
|
|
484
|
+
const STYLE_TOKEN = Symbol("dForm");
|
|
485
|
+
const inBrowser = typeof window !== "undefined";
|
|
486
|
+
function lockScroll() {
|
|
487
|
+
if (document.documentElement.scrollHeight > document.documentElement.clientHeight) {
|
|
488
|
+
const scrollTop = document.documentElement.scrollTop;
|
|
489
|
+
const style = document.documentElement.getAttribute("style");
|
|
490
|
+
document.documentElement.style.position = "fixed";
|
|
491
|
+
document.documentElement.style.top = `-${scrollTop}px`;
|
|
492
|
+
document.documentElement.style.width = document.documentElement.style.width || "100%";
|
|
493
|
+
document.documentElement.style.overflowY = "scroll";
|
|
494
|
+
return () => {
|
|
495
|
+
if (style) {
|
|
496
|
+
document.documentElement.setAttribute("style", style);
|
|
497
|
+
} else {
|
|
498
|
+
document.documentElement.removeAttribute("style");
|
|
499
|
+
}
|
|
500
|
+
document.documentElement.scrollTop = scrollTop;
|
|
501
|
+
};
|
|
502
|
+
}
|
|
503
|
+
return;
|
|
504
|
+
}
|
|
505
|
+
function createBem$1(namespace, element, modifier) {
|
|
476
506
|
let cls = namespace;
|
|
477
507
|
if (element) {
|
|
478
508
|
cls += `__${element}`;
|
|
@@ -482,12 +512,12 @@ function createBem(namespace, element, modifier) {
|
|
|
482
512
|
}
|
|
483
513
|
return cls;
|
|
484
514
|
}
|
|
485
|
-
function useNamespace(block, needDot = false) {
|
|
515
|
+
function useNamespace$1(block, needDot = false) {
|
|
486
516
|
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
487
|
-
const b = () => createBem(namespace);
|
|
488
|
-
const e = (element) => element ? createBem(namespace, element) : "";
|
|
489
|
-
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
490
|
-
const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
|
|
517
|
+
const b = () => createBem$1(namespace);
|
|
518
|
+
const e = (element) => element ? createBem$1(namespace, element) : "";
|
|
519
|
+
const m = (modifier) => modifier ? createBem$1(namespace, "", modifier) : "";
|
|
520
|
+
const em = (element, modifier) => element && modifier ? createBem$1(namespace, element, modifier) : "";
|
|
491
521
|
return {
|
|
492
522
|
b,
|
|
493
523
|
e,
|
|
@@ -495,6 +525,9 @@ function useNamespace(block, needDot = false) {
|
|
|
495
525
|
em
|
|
496
526
|
};
|
|
497
527
|
}
|
|
528
|
+
function isUrl(value) {
|
|
529
|
+
return /^((http|https):)?\/\//.test(value);
|
|
530
|
+
}
|
|
498
531
|
function useFieldCollection() {
|
|
499
532
|
const itemContexts = [];
|
|
500
533
|
const addItemContext = (field) => {
|
|
@@ -5974,7 +6007,7 @@ defineComponent({
|
|
|
5974
6007
|
props: formProps,
|
|
5975
6008
|
emits: ["validate"],
|
|
5976
6009
|
setup(props, ctx2) {
|
|
5977
|
-
const ns2 = useNamespace("form");
|
|
6010
|
+
const ns2 = useNamespace$1("form");
|
|
5978
6011
|
const {
|
|
5979
6012
|
itemContexts,
|
|
5980
6013
|
addItemContext,
|
|
@@ -6001,6 +6034,7 @@ defineComponent({
|
|
|
6001
6034
|
addItemContext,
|
|
6002
6035
|
removeItemContext
|
|
6003
6036
|
})));
|
|
6037
|
+
provide(STYLE_TOKEN, props.styleType);
|
|
6004
6038
|
ctx2.expose({
|
|
6005
6039
|
validate,
|
|
6006
6040
|
validateFields,
|
|
@@ -6042,7 +6076,7 @@ const formItemProps = {
|
|
|
6042
6076
|
default: void 0
|
|
6043
6077
|
},
|
|
6044
6078
|
helpTips: {
|
|
6045
|
-
type: String,
|
|
6079
|
+
type: [String, Object],
|
|
6046
6080
|
default: ""
|
|
6047
6081
|
},
|
|
6048
6082
|
feedbackStatus: {
|
|
@@ -6055,12 +6089,6 @@ const formItemProps = {
|
|
|
6055
6089
|
};
|
|
6056
6090
|
const FORM_ITEM_TOKEN = Symbol("dFormItem");
|
|
6057
6091
|
const LABEL_DATA = Symbol("labelData");
|
|
6058
|
-
const formLabelProps = {
|
|
6059
|
-
helpTips: {
|
|
6060
|
-
type: String,
|
|
6061
|
-
default: ""
|
|
6062
|
-
}
|
|
6063
|
-
};
|
|
6064
6092
|
const fixedOverlayProps = {
|
|
6065
6093
|
modelValue: {
|
|
6066
6094
|
type: Boolean,
|
|
@@ -6075,25 +6103,6 @@ const fixedOverlayProps = {
|
|
|
6075
6103
|
default: true
|
|
6076
6104
|
}
|
|
6077
6105
|
};
|
|
6078
|
-
function lockScroll() {
|
|
6079
|
-
if (document.documentElement.scrollHeight > document.documentElement.clientHeight) {
|
|
6080
|
-
const scrollTop = document.documentElement.scrollTop;
|
|
6081
|
-
const style = document.documentElement.getAttribute("style");
|
|
6082
|
-
document.documentElement.style.position = "fixed";
|
|
6083
|
-
document.documentElement.style.top = `-${scrollTop}px`;
|
|
6084
|
-
document.documentElement.style.width = document.documentElement.style.width || "100%";
|
|
6085
|
-
document.documentElement.style.overflowY = "scroll";
|
|
6086
|
-
return () => {
|
|
6087
|
-
if (style) {
|
|
6088
|
-
document.documentElement.setAttribute("style", style);
|
|
6089
|
-
} else {
|
|
6090
|
-
document.documentElement.removeAttribute("style");
|
|
6091
|
-
}
|
|
6092
|
-
document.documentElement.scrollTop = scrollTop;
|
|
6093
|
-
};
|
|
6094
|
-
}
|
|
6095
|
-
return;
|
|
6096
|
-
}
|
|
6097
6106
|
function useFixedOverlay(props, ctx2) {
|
|
6098
6107
|
let lockScrollCb;
|
|
6099
6108
|
const onClick = (event) => {
|
|
@@ -6116,6 +6125,29 @@ function useFixedOverlay(props, ctx2) {
|
|
|
6116
6125
|
onUnmounted(removeBodyAdditions);
|
|
6117
6126
|
return { onClick };
|
|
6118
6127
|
}
|
|
6128
|
+
function createBem(namespace, element, modifier) {
|
|
6129
|
+
let cls = namespace;
|
|
6130
|
+
if (element) {
|
|
6131
|
+
cls += `__${element}`;
|
|
6132
|
+
}
|
|
6133
|
+
if (modifier) {
|
|
6134
|
+
cls += `--${modifier}`;
|
|
6135
|
+
}
|
|
6136
|
+
return cls;
|
|
6137
|
+
}
|
|
6138
|
+
function useNamespace(block, needDot = false) {
|
|
6139
|
+
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
6140
|
+
const b = () => createBem(namespace);
|
|
6141
|
+
const e = (element) => element ? createBem(namespace, element) : "";
|
|
6142
|
+
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
6143
|
+
const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
|
|
6144
|
+
return {
|
|
6145
|
+
b,
|
|
6146
|
+
e,
|
|
6147
|
+
m,
|
|
6148
|
+
em
|
|
6149
|
+
};
|
|
6150
|
+
}
|
|
6119
6151
|
var fixedOverlay = "";
|
|
6120
6152
|
defineComponent({
|
|
6121
6153
|
name: "DFixedOverlay",
|
|
@@ -6319,7 +6351,6 @@ const FlexibleOverlay = defineComponent({
|
|
|
6319
6351
|
};
|
|
6320
6352
|
}
|
|
6321
6353
|
});
|
|
6322
|
-
const inBrowser = typeof window !== "undefined";
|
|
6323
6354
|
const POPPER_TRIGGER_TOKEN = Symbol("popper-trigger");
|
|
6324
6355
|
const isObject = (val) => val !== null && typeof val === "object";
|
|
6325
6356
|
const ns$1 = useNamespace("popper-trigger");
|
|
@@ -6781,7 +6812,13 @@ function useFormLabel() {
|
|
|
6781
6812
|
const formContext = inject(FORM_TOKEN);
|
|
6782
6813
|
const formItemContext = inject(FORM_ITEM_TOKEN);
|
|
6783
6814
|
const labelData = inject(LABEL_DATA);
|
|
6784
|
-
const ns2 = useNamespace("form");
|
|
6815
|
+
const ns2 = useNamespace$1("form");
|
|
6816
|
+
const defaultTipsPopover = {
|
|
6817
|
+
content: "",
|
|
6818
|
+
position: ["top"],
|
|
6819
|
+
trigger: "hover",
|
|
6820
|
+
popType: "info"
|
|
6821
|
+
};
|
|
6785
6822
|
const labelClasses = computed(() => ({
|
|
6786
6823
|
[`${ns2.e("label")}`]: true,
|
|
6787
6824
|
[`${ns2.em("label", "vertical")}`]: labelData.value.layout === "vertical",
|
|
@@ -6793,17 +6830,24 @@ function useFormLabel() {
|
|
|
6793
6830
|
[`${ns2.em("label", "required")}`]: formItemContext.isRequired,
|
|
6794
6831
|
[`${ns2.em("label", "required-hide")}`]: formItemContext.isRequired && formContext.hideRequiredMark
|
|
6795
6832
|
}));
|
|
6796
|
-
|
|
6833
|
+
const tipsPopover = computed(() => {
|
|
6834
|
+
if (typeof labelData.value.helpTips === "string") {
|
|
6835
|
+
return __spreadProps(__spreadValues({}, defaultTipsPopover), { content: labelData.value.helpTips });
|
|
6836
|
+
} else {
|
|
6837
|
+
return __spreadValues(__spreadValues({}, defaultTipsPopover), labelData.value.helpTips);
|
|
6838
|
+
}
|
|
6839
|
+
});
|
|
6840
|
+
return { labelClasses, labelInnerClasses, tipsPopover };
|
|
6797
6841
|
}
|
|
6798
6842
|
var formLabel = "";
|
|
6799
6843
|
var FormLabel = defineComponent({
|
|
6800
6844
|
name: "DFormLabel",
|
|
6801
|
-
|
|
6802
|
-
|
|
6803
|
-
const ns2 = useNamespace("form");
|
|
6845
|
+
setup(_, ctx2) {
|
|
6846
|
+
const ns2 = useNamespace$1("form");
|
|
6804
6847
|
const {
|
|
6805
6848
|
labelClasses,
|
|
6806
|
-
labelInnerClasses
|
|
6849
|
+
labelInnerClasses,
|
|
6850
|
+
tipsPopover
|
|
6807
6851
|
} = useFormLabel();
|
|
6808
6852
|
return () => {
|
|
6809
6853
|
var _a, _b;
|
|
@@ -6811,12 +6855,9 @@ var FormLabel = defineComponent({
|
|
|
6811
6855
|
"class": labelClasses.value
|
|
6812
6856
|
}, [createVNode("span", {
|
|
6813
6857
|
"class": labelInnerClasses.value
|
|
6814
|
-
}, [(_b = (_a = ctx2.slots).default) == null ? void 0 : _b.call(_a)]),
|
|
6815
|
-
"
|
|
6816
|
-
|
|
6817
|
-
"trigger": "hover",
|
|
6818
|
-
"pop-type": "info"
|
|
6819
|
-
}, {
|
|
6858
|
+
}, [(_b = (_a = ctx2.slots).default) == null ? void 0 : _b.call(_a)]), tipsPopover.value.content && createVNode(Popover, mergeProps({
|
|
6859
|
+
"class": ns2.e("label-tips-popover")
|
|
6860
|
+
}, tipsPopover.value), {
|
|
6820
6861
|
default: () => [createVNode(HelpTipsIcon, {
|
|
6821
6862
|
"class": ns2.e("label-help")
|
|
6822
6863
|
}, null), createTextVNode(",")]
|
|
@@ -6835,7 +6876,7 @@ const formControlProps = {
|
|
|
6835
6876
|
};
|
|
6836
6877
|
function useFormControl(props) {
|
|
6837
6878
|
const labelData = inject(LABEL_DATA);
|
|
6838
|
-
const ns2 = useNamespace("form");
|
|
6879
|
+
const ns2 = useNamespace$1("form");
|
|
6839
6880
|
const { feedbackStatus } = toRefs(props);
|
|
6840
6881
|
const controlClasses = computed(() => ({
|
|
6841
6882
|
[ns2.e("control")]: true,
|
|
@@ -6847,7 +6888,7 @@ function useFormControl(props) {
|
|
|
6847
6888
|
[ns2.em("control-container", "has-feedback")]: Boolean(feedbackStatus == null ? void 0 : feedbackStatus.value),
|
|
6848
6889
|
[ns2.em("control-container", "feedback-error")]: Boolean((feedbackStatus == null ? void 0 : feedbackStatus.value) === "error")
|
|
6849
6890
|
}));
|
|
6850
|
-
return { controlClasses, controlContainerClasses };
|
|
6891
|
+
return { controlClasses, controlContainerClasses, labelData };
|
|
6851
6892
|
}
|
|
6852
6893
|
function useFormControlValidate() {
|
|
6853
6894
|
const formItemContext = inject(FORM_ITEM_TOKEN);
|
|
@@ -6864,11 +6905,15 @@ var FormControl = defineComponent({
|
|
|
6864
6905
|
name: "DFormControl",
|
|
6865
6906
|
props: formControlProps,
|
|
6866
6907
|
setup(props, ctx2) {
|
|
6908
|
+
const formContext = inject(FORM_TOKEN);
|
|
6867
6909
|
const formControl2 = ref();
|
|
6868
|
-
const
|
|
6910
|
+
const popoverRef = ref();
|
|
6911
|
+
const ns2 = useNamespace$1("form");
|
|
6912
|
+
const showPopoverClick = ref(true);
|
|
6869
6913
|
const {
|
|
6870
6914
|
controlClasses,
|
|
6871
|
-
controlContainerClasses
|
|
6915
|
+
controlContainerClasses,
|
|
6916
|
+
labelData
|
|
6872
6917
|
} = useFormControl(props);
|
|
6873
6918
|
const {
|
|
6874
6919
|
feedbackStatus,
|
|
@@ -6878,17 +6923,52 @@ var FormControl = defineComponent({
|
|
|
6878
6923
|
errorMessage,
|
|
6879
6924
|
popPosition
|
|
6880
6925
|
} = useFormControlValidate();
|
|
6926
|
+
const align = computed(() => {
|
|
6927
|
+
var _a, _b;
|
|
6928
|
+
if ((_a = popPosition.value) == null ? void 0 : _a.some((item) => item.includes("start"))) {
|
|
6929
|
+
return "start";
|
|
6930
|
+
}
|
|
6931
|
+
if ((_b = popPosition.value) == null ? void 0 : _b.some((item) => item.includes("end"))) {
|
|
6932
|
+
return "end";
|
|
6933
|
+
}
|
|
6934
|
+
return void 0;
|
|
6935
|
+
});
|
|
6936
|
+
const onDocumentClick = (e) => {
|
|
6937
|
+
const composedPath = e.composedPath();
|
|
6938
|
+
if (composedPath.includes(popoverRef.value.triggerEl)) {
|
|
6939
|
+
showPopoverClick.value = true;
|
|
6940
|
+
} else {
|
|
6941
|
+
showPopoverClick.value = false;
|
|
6942
|
+
}
|
|
6943
|
+
};
|
|
6944
|
+
watch(showPopover, (val) => {
|
|
6945
|
+
if (val) {
|
|
6946
|
+
setTimeout(() => {
|
|
6947
|
+
document.addEventListener("click", onDocumentClick);
|
|
6948
|
+
});
|
|
6949
|
+
} else {
|
|
6950
|
+
showPopoverClick.value = true;
|
|
6951
|
+
document.removeEventListener("click", onDocumentClick);
|
|
6952
|
+
}
|
|
6953
|
+
});
|
|
6954
|
+
onUnmounted(() => {
|
|
6955
|
+
document.removeEventListener("click", onDocumentClick);
|
|
6956
|
+
});
|
|
6881
6957
|
return () => createVNode("div", {
|
|
6882
6958
|
"class": controlClasses.value,
|
|
6883
6959
|
"ref": formControl2
|
|
6884
6960
|
}, [createVNode("div", {
|
|
6885
6961
|
"class": controlContainerClasses.value
|
|
6886
6962
|
}, [createVNode(Popover, {
|
|
6887
|
-
"
|
|
6963
|
+
"ref": popoverRef,
|
|
6964
|
+
"is-open": showPopover.value && showPopoverClick.value,
|
|
6888
6965
|
"trigger": "manually",
|
|
6889
6966
|
"content": errorMessage.value,
|
|
6890
6967
|
"pop-type": "error",
|
|
6891
|
-
"position": popPosition.value
|
|
6968
|
+
"position": popPosition.value,
|
|
6969
|
+
"align": align.value,
|
|
6970
|
+
"scroll-element": "auto",
|
|
6971
|
+
"append-to-body-scroll-strategy": formContext.appendToBodyScrollStrategy
|
|
6892
6972
|
}, {
|
|
6893
6973
|
default: () => {
|
|
6894
6974
|
var _a, _b;
|
|
@@ -6900,7 +6980,7 @@ var FormControl = defineComponent({
|
|
|
6900
6980
|
"class": ns2.e("control-info")
|
|
6901
6981
|
}, [showMessage.value && createVNode("div", {
|
|
6902
6982
|
"class": "error-message"
|
|
6903
|
-
}, [errorMessage.value]), props.extraInfo && createVNode("div", {
|
|
6983
|
+
}, [errorMessage.value]), labelData.value.formItemCtx.slots.extraInfo ? labelData.value.formItemCtx.slots.extraInfo() : props.extraInfo && createVNode("div", {
|
|
6904
6984
|
"class": ns2.e("control-extra")
|
|
6905
6985
|
}, [props.extraInfo])])]);
|
|
6906
6986
|
}
|
|
@@ -7919,7 +7999,7 @@ function getFieldValue(obj, path) {
|
|
|
7919
7999
|
}
|
|
7920
8000
|
function useFormItem(messageType, _rules, validateState) {
|
|
7921
8001
|
const formContext = inject(FORM_TOKEN);
|
|
7922
|
-
const ns2 = useNamespace("form");
|
|
8002
|
+
const ns2 = useNamespace$1("form");
|
|
7923
8003
|
const itemClasses = computed(() => ({
|
|
7924
8004
|
[`${ns2.em("item", "horizontal")}`]: formContext.layout === "horizontal",
|
|
7925
8005
|
[`${ns2.em("item", "vertical")}`]: formContext.layout === "vertical",
|
|
@@ -8083,7 +8163,9 @@ defineComponent({
|
|
|
8083
8163
|
const labelData = computed(() => ({
|
|
8084
8164
|
layout: formContext.layout,
|
|
8085
8165
|
labelSize: formContext.labelSize,
|
|
8086
|
-
labelAlign: formContext.labelAlign
|
|
8166
|
+
labelAlign: formContext.labelAlign,
|
|
8167
|
+
helpTips: helpTips.value,
|
|
8168
|
+
formItemCtx: ctx2
|
|
8087
8169
|
}));
|
|
8088
8170
|
provide(LABEL_DATA, labelData);
|
|
8089
8171
|
const context = reactive(__spreadProps(__spreadValues({}, otherProps), {
|
|
@@ -8099,6 +8181,7 @@ defineComponent({
|
|
|
8099
8181
|
}));
|
|
8100
8182
|
provide(FORM_ITEM_TOKEN, context);
|
|
8101
8183
|
ctx2.expose({
|
|
8184
|
+
validate,
|
|
8102
8185
|
resetField,
|
|
8103
8186
|
clearValidate
|
|
8104
8187
|
});
|
|
@@ -8112,9 +8195,7 @@ defineComponent({
|
|
|
8112
8195
|
});
|
|
8113
8196
|
return () => createVNode("div", {
|
|
8114
8197
|
"class": itemClasses.value
|
|
8115
|
-
}, [createVNode(FormLabel, {
|
|
8116
|
-
"help-tips": helpTips.value
|
|
8117
|
-
}, {
|
|
8198
|
+
}, [createVNode(FormLabel, null, {
|
|
8118
8199
|
default: () => [ctx2.slots.label ? ctx2.slots.label() : label == null ? void 0 : label.value]
|
|
8119
8200
|
}), createVNode(FormControl, {
|
|
8120
8201
|
"feedback-status": feedbackStatus == null ? void 0 : feedbackStatus.value,
|
|
@@ -8781,9 +8862,6 @@ var svgIcon = defineComponent({
|
|
|
8781
8862
|
};
|
|
8782
8863
|
}
|
|
8783
8864
|
});
|
|
8784
|
-
function isUrl(value) {
|
|
8785
|
-
return /^((http|https):)?\/\//.test(value);
|
|
8786
|
-
}
|
|
8787
8865
|
function useIconDom(props, ctx2) {
|
|
8788
8866
|
const {
|
|
8789
8867
|
component,
|