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
@@ -6082,6 +6082,10 @@ const formItemProps = {
6082
6082
  extraInfo: {
6083
6083
  type: String,
6084
6084
  default: ""
6085
+ },
6086
+ isAsyncValidate: {
6087
+ type: Boolean,
6088
+ default: false
6085
6089
  }
6086
6090
  };
6087
6091
  const FORM_ITEM_TOKEN = "dFormItem";
@@ -6644,7 +6648,6 @@ var FormControl = defineComponent({
6644
6648
  const formControl2 = ref();
6645
6649
  const popoverRef = ref();
6646
6650
  const ns2 = useNamespace("form");
6647
- const showPopoverClick = ref(true);
6648
6651
  const {
6649
6652
  controlClasses,
6650
6653
  controlContainerClasses,
@@ -6668,27 +6671,6 @@ var FormControl = defineComponent({
6668
6671
  }
6669
6672
  return void 0;
6670
6673
  });
6671
- const onDocumentClick = (e) => {
6672
- const composedPath = e.composedPath();
6673
- if (composedPath.includes(popoverRef.value.triggerEl)) {
6674
- showPopoverClick.value = true;
6675
- } else {
6676
- showPopoverClick.value = false;
6677
- }
6678
- };
6679
- watch(showPopover, (val) => {
6680
- if (val) {
6681
- setTimeout(() => {
6682
- document.addEventListener("click", onDocumentClick);
6683
- });
6684
- } else {
6685
- showPopoverClick.value = true;
6686
- document.removeEventListener("click", onDocumentClick);
6687
- }
6688
- });
6689
- onUnmounted(() => {
6690
- document.removeEventListener("click", onDocumentClick);
6691
- });
6692
6674
  return () => createVNode("div", {
6693
6675
  "class": controlClasses.value,
6694
6676
  "ref": formControl2
@@ -6696,7 +6678,7 @@ var FormControl = defineComponent({
6696
6678
  "class": controlContainerClasses.value
6697
6679
  }, [createVNode(Popover, {
6698
6680
  "ref": popoverRef,
6699
- "is-open": showPopover.value && showPopoverClick.value,
6681
+ "is-open": showPopover.value,
6700
6682
  "trigger": "manually",
6701
6683
  "content": errorMessage.value,
6702
6684
  "pop-type": "error",
@@ -7826,7 +7808,9 @@ function useFormItemValidate(props, _rules) {
7826
7808
  callback == null ? void 0 : callback(true);
7827
7809
  return true;
7828
7810
  }
7829
- validateState.value = "pending";
7811
+ if (props.isAsyncValidate) {
7812
+ validateState.value = "pending";
7813
+ }
7830
7814
  return execValidate(rules2).then(() => {
7831
7815
  callback == null ? void 0 : callback(true);
7832
7816
  return true;
@@ -11367,7 +11351,7 @@ function useDataGrid(props, ctx) {
11367
11351
  (_a = scrollRef.value) == null ? void 0 : _a.addEventListener("scroll", onScroll);
11368
11352
  if (typeof window !== "undefined" && scrollRef.value) {
11369
11353
  resizeObserver = new ResizeObserver(() => {
11370
- if (scrollRef.value) {
11354
+ if (scrollRef.value && sliceColumns.value.length) {
11371
11355
  let distance = 0;
11372
11356
  initOriginColumnData();
11373
11357
  distance = scrollRef.value.scrollLeft;