vue-devui 1.6.9 → 1.6.10

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.
Files changed (51) hide show
  1. package/auto-complete/index.es.js +8 -24
  2. package/auto-complete/index.umd.js +15 -15
  3. package/category-search/index.es.js +8 -24
  4. package/category-search/index.umd.js +18 -18
  5. package/checkbox/index.es.js +14 -30
  6. package/checkbox/index.umd.js +17 -17
  7. package/data-grid/index.es.js +9 -25
  8. package/data-grid/index.umd.js +7 -7
  9. package/date-picker-pro/index.es.js +8 -24
  10. package/date-picker-pro/index.umd.js +12 -12
  11. package/editor-md/index.es.js +0 -1
  12. package/editor-md/index.umd.js +4 -4
  13. package/form/index.es.js +14 -30
  14. package/form/index.umd.js +12 -12
  15. package/input/index.es.js +14 -30
  16. package/input/index.umd.js +10 -10
  17. package/input-number/index.es.js +14 -30
  18. package/input-number/index.umd.js +13 -13
  19. package/mention/index.es.js +8 -24
  20. package/mention/index.umd.js +13 -13
  21. package/modal/index.es.js +18 -12
  22. package/modal/index.umd.js +7 -7
  23. package/package.json +1 -1
  24. package/pagination/index.es.js +8 -24
  25. package/pagination/index.umd.js +7 -7
  26. package/radio/index.es.js +14 -30
  27. package/radio/index.umd.js +19 -19
  28. package/search/index.es.js +20 -30
  29. package/search/index.umd.js +11 -11
  30. package/search/style.css +1 -1
  31. package/select/index.es.js +14 -30
  32. package/select/index.umd.js +9 -9
  33. package/style.css +1 -1
  34. package/switch/index.es.js +8 -24
  35. package/switch/index.umd.js +15 -15
  36. package/table/index.es.js +8 -24
  37. package/table/index.umd.js +7 -7
  38. package/textarea/index.es.js +14 -30
  39. package/textarea/index.umd.js +18 -18
  40. package/time-picker/index.es.js +8 -24
  41. package/time-picker/index.umd.js +9 -9
  42. package/time-select/index.es.js +14 -30
  43. package/time-select/index.umd.js +14 -14
  44. package/tree/index.es.js +8 -24
  45. package/tree/index.umd.js +9 -9
  46. package/types/form/src/components/form-item/form-item-types.d.ts +4 -0
  47. package/types/form/src/components/form-item/form-item.d.ts +9 -0
  48. package/types/search/src/search-types.d.ts +4 -0
  49. package/types/search/src/search.d.ts +9 -0
  50. package/vue-devui.es.js +34 -39
  51. package/vue-devui.umd.js +43 -43
@@ -7111,6 +7111,10 @@ const formItemProps = {
7111
7111
  extraInfo: {
7112
7112
  type: String,
7113
7113
  default: ""
7114
+ },
7115
+ isAsyncValidate: {
7116
+ type: Boolean,
7117
+ default: false
7114
7118
  }
7115
7119
  };
7116
7120
  const FORM_ITEM_TOKEN = "dFormItem";
@@ -8102,7 +8106,6 @@ var FormControl = defineComponent({
8102
8106
  const formControl2 = ref();
8103
8107
  const popoverRef = ref();
8104
8108
  const ns2 = useNamespace("form");
8105
- const showPopoverClick = ref(true);
8106
8109
  const {
8107
8110
  controlClasses,
8108
8111
  controlContainerClasses,
@@ -8126,27 +8129,6 @@ var FormControl = defineComponent({
8126
8129
  }
8127
8130
  return void 0;
8128
8131
  });
8129
- const onDocumentClick = (e) => {
8130
- const composedPath = e.composedPath();
8131
- if (composedPath.includes(popoverRef.value.triggerEl)) {
8132
- showPopoverClick.value = true;
8133
- } else {
8134
- showPopoverClick.value = false;
8135
- }
8136
- };
8137
- watch(showPopover, (val) => {
8138
- if (val) {
8139
- setTimeout(() => {
8140
- document.addEventListener("click", onDocumentClick);
8141
- });
8142
- } else {
8143
- showPopoverClick.value = true;
8144
- document.removeEventListener("click", onDocumentClick);
8145
- }
8146
- });
8147
- onUnmounted(() => {
8148
- document.removeEventListener("click", onDocumentClick);
8149
- });
8150
8132
  return () => createVNode("div", {
8151
8133
  "class": controlClasses.value,
8152
8134
  "ref": formControl2
@@ -8154,7 +8136,7 @@ var FormControl = defineComponent({
8154
8136
  "class": controlContainerClasses.value
8155
8137
  }, [createVNode(Popover, {
8156
8138
  "ref": popoverRef,
8157
- "is-open": showPopover.value && showPopoverClick.value,
8139
+ "is-open": showPopover.value,
8158
8140
  "trigger": "manually",
8159
8141
  "content": errorMessage.value,
8160
8142
  "pop-type": "error",
@@ -9284,7 +9266,9 @@ function useFormItemValidate(props, _rules) {
9284
9266
  callback == null ? void 0 : callback(true);
9285
9267
  return true;
9286
9268
  }
9287
- validateState.value = "pending";
9269
+ if (props.isAsyncValidate) {
9270
+ validateState.value = "pending";
9271
+ }
9288
9272
  return execValidate(rules2).then(() => {
9289
9273
  callback == null ? void 0 : callback(true);
9290
9274
  return true;