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
package/tree/index.es.js CHANGED
@@ -7976,6 +7976,10 @@ const formItemProps = {
7976
7976
  extraInfo: {
7977
7977
  type: String,
7978
7978
  default: ""
7979
+ },
7980
+ isAsyncValidate: {
7981
+ type: Boolean,
7982
+ default: false
7979
7983
  }
7980
7984
  };
7981
7985
  const FORM_ITEM_TOKEN = "dFormItem";
@@ -8780,7 +8784,6 @@ var FormControl = defineComponent({
8780
8784
  const formControl2 = ref();
8781
8785
  const popoverRef = ref();
8782
8786
  const ns2 = useNamespace$1("form");
8783
- const showPopoverClick = ref(true);
8784
8787
  const {
8785
8788
  controlClasses,
8786
8789
  controlContainerClasses,
@@ -8804,27 +8807,6 @@ var FormControl = defineComponent({
8804
8807
  }
8805
8808
  return void 0;
8806
8809
  });
8807
- const onDocumentClick = (e) => {
8808
- const composedPath = e.composedPath();
8809
- if (composedPath.includes(popoverRef.value.triggerEl)) {
8810
- showPopoverClick.value = true;
8811
- } else {
8812
- showPopoverClick.value = false;
8813
- }
8814
- };
8815
- watch(showPopover, (val) => {
8816
- if (val) {
8817
- setTimeout(() => {
8818
- document.addEventListener("click", onDocumentClick);
8819
- });
8820
- } else {
8821
- showPopoverClick.value = true;
8822
- document.removeEventListener("click", onDocumentClick);
8823
- }
8824
- });
8825
- onUnmounted(() => {
8826
- document.removeEventListener("click", onDocumentClick);
8827
- });
8828
8810
  return () => createVNode("div", {
8829
8811
  "class": controlClasses.value,
8830
8812
  "ref": formControl2
@@ -8832,7 +8814,7 @@ var FormControl = defineComponent({
8832
8814
  "class": controlContainerClasses.value
8833
8815
  }, [createVNode(Popover, {
8834
8816
  "ref": popoverRef,
8835
- "is-open": showPopover.value && showPopoverClick.value,
8817
+ "is-open": showPopover.value,
8836
8818
  "trigger": "manually",
8837
8819
  "content": errorMessage.value,
8838
8820
  "pop-type": "error",
@@ -9962,7 +9944,9 @@ function useFormItemValidate(props, _rules) {
9962
9944
  callback == null ? void 0 : callback(true);
9963
9945
  return true;
9964
9946
  }
9965
- validateState.value = "pending";
9947
+ if (props.isAsyncValidate) {
9948
+ validateState.value = "pending";
9949
+ }
9966
9950
  return execValidate(rules2).then(() => {
9967
9951
  callback == null ? void 0 : callback(true);
9968
9952
  return true;