vue-devui 1.6.9 → 1.6.11
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 +8 -24
- package/auto-complete/index.umd.js +15 -15
- package/category-search/index.es.js +19 -36
- package/category-search/index.umd.js +18 -18
- package/checkbox/index.es.js +16 -33
- package/checkbox/index.umd.js +17 -17
- package/data-grid/index.es.js +11 -28
- package/data-grid/index.umd.js +7 -7
- package/date-picker-pro/index.es.js +36 -30
- package/date-picker-pro/index.umd.js +11 -11
- package/editor-md/index.es.js +0 -1
- package/editor-md/index.umd.js +4 -4
- package/form/index.es.js +14 -30
- package/form/index.umd.js +12 -12
- package/input/index.es.js +14 -30
- package/input/index.umd.js +10 -10
- package/input-number/index.es.js +14 -30
- package/input-number/index.umd.js +13 -13
- package/mention/index.es.js +8 -24
- package/mention/index.umd.js +13 -13
- package/menu/index.es.js +26 -2
- package/menu/index.umd.js +5 -1
- package/menu/style.css +1 -1
- package/modal/index.es.js +18 -12
- package/modal/index.umd.js +7 -7
- package/package.json +1 -1
- package/pagination/index.es.js +10 -27
- package/pagination/index.umd.js +7 -7
- package/radio/index.es.js +14 -30
- package/radio/index.umd.js +19 -19
- package/search/index.es.js +20 -30
- package/search/index.umd.js +11 -11
- package/search/style.css +1 -1
- package/select/index.es.js +16 -33
- package/select/index.umd.js +9 -9
- package/style.css +1 -1
- package/switch/index.es.js +8 -24
- package/switch/index.umd.js +15 -15
- package/table/index.es.js +10 -27
- package/table/index.umd.js +7 -7
- package/textarea/index.es.js +14 -30
- package/textarea/index.umd.js +18 -18
- package/time-picker/index.es.js +8 -24
- package/time-picker/index.umd.js +9 -9
- package/time-select/index.es.js +16 -33
- package/time-select/index.umd.js +14 -14
- package/tree/index.es.js +10 -27
- package/tree/index.umd.js +9 -9
- package/types/checkbox/src/checkbox-types.d.ts +0 -2
- package/types/date-picker-pro/src/date-picker-pro-types.d.ts +13 -0
- package/types/date-picker-pro/src/range-date-picker-types.d.ts +4 -0
- package/types/form/src/components/form-item/form-item-types.d.ts +4 -0
- package/types/form/src/components/form-item/form-item.d.ts +9 -0
- package/types/search/src/search-types.d.ts +4 -0
- package/types/search/src/search.d.ts +9 -0
- package/vue-devui.es.js +79 -59
- package/vue-devui.umd.js +43 -43
|
@@ -67,6 +67,10 @@ const datePickerProCommonProps = {
|
|
|
67
67
|
showGlowStyle: {
|
|
68
68
|
type: Boolean,
|
|
69
69
|
default: true
|
|
70
|
+
},
|
|
71
|
+
position: {
|
|
72
|
+
type: Array,
|
|
73
|
+
default: () => ["bottom-start", "top-start"]
|
|
70
74
|
}
|
|
71
75
|
};
|
|
72
76
|
const datePickerProProps = __spreadValues({
|
|
@@ -6010,6 +6014,10 @@ const formItemProps = {
|
|
|
6010
6014
|
extraInfo: {
|
|
6011
6015
|
type: String,
|
|
6012
6016
|
default: ""
|
|
6017
|
+
},
|
|
6018
|
+
isAsyncValidate: {
|
|
6019
|
+
type: Boolean,
|
|
6020
|
+
default: false
|
|
6013
6021
|
}
|
|
6014
6022
|
};
|
|
6015
6023
|
const FORM_ITEM_TOKEN = "dFormItem";
|
|
@@ -6837,7 +6845,6 @@ var FormControl = defineComponent({
|
|
|
6837
6845
|
const formControl2 = ref();
|
|
6838
6846
|
const popoverRef = ref();
|
|
6839
6847
|
const ns2 = useNamespace$1("form");
|
|
6840
|
-
const showPopoverClick = ref(true);
|
|
6841
6848
|
const {
|
|
6842
6849
|
controlClasses,
|
|
6843
6850
|
controlContainerClasses,
|
|
@@ -6861,27 +6868,6 @@ var FormControl = defineComponent({
|
|
|
6861
6868
|
}
|
|
6862
6869
|
return void 0;
|
|
6863
6870
|
});
|
|
6864
|
-
const onDocumentClick = (e) => {
|
|
6865
|
-
const composedPath = e.composedPath();
|
|
6866
|
-
if (composedPath.includes(popoverRef.value.triggerEl)) {
|
|
6867
|
-
showPopoverClick.value = true;
|
|
6868
|
-
} else {
|
|
6869
|
-
showPopoverClick.value = false;
|
|
6870
|
-
}
|
|
6871
|
-
};
|
|
6872
|
-
watch(showPopover, (val) => {
|
|
6873
|
-
if (val) {
|
|
6874
|
-
setTimeout(() => {
|
|
6875
|
-
document.addEventListener("click", onDocumentClick);
|
|
6876
|
-
});
|
|
6877
|
-
} else {
|
|
6878
|
-
showPopoverClick.value = true;
|
|
6879
|
-
document.removeEventListener("click", onDocumentClick);
|
|
6880
|
-
}
|
|
6881
|
-
});
|
|
6882
|
-
onUnmounted(() => {
|
|
6883
|
-
document.removeEventListener("click", onDocumentClick);
|
|
6884
|
-
});
|
|
6885
6871
|
return () => createVNode("div", {
|
|
6886
6872
|
"class": controlClasses.value,
|
|
6887
6873
|
"ref": formControl2
|
|
@@ -6889,7 +6875,7 @@ var FormControl = defineComponent({
|
|
|
6889
6875
|
"class": controlContainerClasses.value
|
|
6890
6876
|
}, [createVNode(Popover, {
|
|
6891
6877
|
"ref": popoverRef,
|
|
6892
|
-
"is-open": showPopover.value
|
|
6878
|
+
"is-open": showPopover.value,
|
|
6893
6879
|
"trigger": "manually",
|
|
6894
6880
|
"content": errorMessage.value,
|
|
6895
6881
|
"pop-type": "error",
|
|
@@ -8019,7 +8005,9 @@ function useFormItemValidate(props, _rules) {
|
|
|
8019
8005
|
callback == null ? void 0 : callback(true);
|
|
8020
8006
|
return true;
|
|
8021
8007
|
}
|
|
8022
|
-
|
|
8008
|
+
if (props.isAsyncValidate) {
|
|
8009
|
+
validateState.value = "pending";
|
|
8010
|
+
}
|
|
8023
8011
|
return execValidate(rules2).then(() => {
|
|
8024
8012
|
callback == null ? void 0 : callback(true);
|
|
8025
8013
|
return true;
|
|
@@ -11932,7 +11920,8 @@ var DatePickerPro = defineComponent({
|
|
|
11932
11920
|
const app = getCurrentInstance();
|
|
11933
11921
|
const t = createI18nTranslate("DDatePickerPro", app);
|
|
11934
11922
|
const {
|
|
11935
|
-
showGlowStyle
|
|
11923
|
+
showGlowStyle,
|
|
11924
|
+
position
|
|
11936
11925
|
} = toRefs(props);
|
|
11937
11926
|
const ns2 = useNamespace("date-picker-pro");
|
|
11938
11927
|
const {
|
|
@@ -11953,7 +11942,6 @@ var DatePickerPro = defineComponent({
|
|
|
11953
11942
|
onSelectedDate,
|
|
11954
11943
|
handlerClearTime
|
|
11955
11944
|
} = usePickerPro(props, ctx, t);
|
|
11956
|
-
const position = ref(["bottom-start", "top-start"]);
|
|
11957
11945
|
const currentPosition = ref("bottom");
|
|
11958
11946
|
const handlePositionChange = (pos) => {
|
|
11959
11947
|
currentPosition.value = pos.split("-")[0] === "top" ? "top" : "bottom";
|
|
@@ -11962,6 +11950,15 @@ var DatePickerPro = defineComponent({
|
|
|
11962
11950
|
transformOrigin: currentPosition.value === "top" ? "0% 100%" : "0% 0%",
|
|
11963
11951
|
"z-index": "var(--devui-z-index-dropdown, 1052)"
|
|
11964
11952
|
}));
|
|
11953
|
+
const align = computed(() => {
|
|
11954
|
+
if (position.value.some((item) => item.includes("start"))) {
|
|
11955
|
+
return "start";
|
|
11956
|
+
}
|
|
11957
|
+
if (position.value.some((item) => item.includes("end"))) {
|
|
11958
|
+
return "end";
|
|
11959
|
+
}
|
|
11960
|
+
return void 0;
|
|
11961
|
+
});
|
|
11965
11962
|
return () => {
|
|
11966
11963
|
var _a, _b;
|
|
11967
11964
|
const vSlots = {
|
|
@@ -12003,7 +12000,7 @@ var DatePickerPro = defineComponent({
|
|
|
12003
12000
|
"onUpdate:modelValue": ($event) => isPanelShow.value = $event,
|
|
12004
12001
|
"ref": overlayRef,
|
|
12005
12002
|
"origin": originRef.value,
|
|
12006
|
-
"align":
|
|
12003
|
+
"align": align.value,
|
|
12007
12004
|
"position": position.value,
|
|
12008
12005
|
"style": styles.value,
|
|
12009
12006
|
"onPositionChange": handlePositionChange
|
|
@@ -12169,7 +12166,8 @@ var DRangeDatePickerPro = defineComponent({
|
|
|
12169
12166
|
const app = getCurrentInstance();
|
|
12170
12167
|
const t = createI18nTranslate("DDatePickerPro", app);
|
|
12171
12168
|
const {
|
|
12172
|
-
showGlowStyle
|
|
12169
|
+
showGlowStyle,
|
|
12170
|
+
position
|
|
12173
12171
|
} = toRefs(props);
|
|
12174
12172
|
const ns2 = useNamespace("range-date-picker-pro");
|
|
12175
12173
|
const {
|
|
@@ -12194,7 +12192,6 @@ var DRangeDatePickerPro = defineComponent({
|
|
|
12194
12192
|
handlerClearTime,
|
|
12195
12193
|
onChangeRangeFocusType
|
|
12196
12194
|
} = useRangePickerPro(props, ctx);
|
|
12197
|
-
const position = ref(["bottom-start", "top-start"]);
|
|
12198
12195
|
const currentPosition = ref("bottom");
|
|
12199
12196
|
const handlePositionChange = (pos) => {
|
|
12200
12197
|
currentPosition.value = pos.split("-")[0] === "top" ? "top" : "bottom";
|
|
@@ -12203,6 +12200,15 @@ var DRangeDatePickerPro = defineComponent({
|
|
|
12203
12200
|
transformOrigin: currentPosition.value === "top" ? "0% 100%" : "0% 0%",
|
|
12204
12201
|
"z-index": "var(--devui-z-index-dropdown, 1052)"
|
|
12205
12202
|
}));
|
|
12203
|
+
const align = computed(() => {
|
|
12204
|
+
if (position.value.some((item) => item.includes("start"))) {
|
|
12205
|
+
return "start";
|
|
12206
|
+
}
|
|
12207
|
+
if (position.value.some((item) => item.includes("end"))) {
|
|
12208
|
+
return "end";
|
|
12209
|
+
}
|
|
12210
|
+
return void 0;
|
|
12211
|
+
});
|
|
12206
12212
|
return () => {
|
|
12207
12213
|
var _a, _b;
|
|
12208
12214
|
const vSlots = {
|
|
@@ -12264,7 +12270,7 @@ var DRangeDatePickerPro = defineComponent({
|
|
|
12264
12270
|
"onUpdate:modelValue": ($event) => isPanelShow.value = $event,
|
|
12265
12271
|
"ref": overlayRef,
|
|
12266
12272
|
"origin": originRef.value,
|
|
12267
|
-
"align":
|
|
12273
|
+
"align": align.value,
|
|
12268
12274
|
"position": position.value,
|
|
12269
12275
|
"style": styles.value,
|
|
12270
12276
|
"onPositionChange": handlePositionChange
|