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.
Files changed (57) 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 +19 -36
  4. package/category-search/index.umd.js +18 -18
  5. package/checkbox/index.es.js +16 -33
  6. package/checkbox/index.umd.js +17 -17
  7. package/data-grid/index.es.js +11 -28
  8. package/data-grid/index.umd.js +7 -7
  9. package/date-picker-pro/index.es.js +36 -30
  10. package/date-picker-pro/index.umd.js +11 -11
  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/menu/index.es.js +26 -2
  22. package/menu/index.umd.js +5 -1
  23. package/menu/style.css +1 -1
  24. package/modal/index.es.js +18 -12
  25. package/modal/index.umd.js +7 -7
  26. package/package.json +1 -1
  27. package/pagination/index.es.js +10 -27
  28. package/pagination/index.umd.js +7 -7
  29. package/radio/index.es.js +14 -30
  30. package/radio/index.umd.js +19 -19
  31. package/search/index.es.js +20 -30
  32. package/search/index.umd.js +11 -11
  33. package/search/style.css +1 -1
  34. package/select/index.es.js +16 -33
  35. package/select/index.umd.js +9 -9
  36. package/style.css +1 -1
  37. package/switch/index.es.js +8 -24
  38. package/switch/index.umd.js +15 -15
  39. package/table/index.es.js +10 -27
  40. package/table/index.umd.js +7 -7
  41. package/textarea/index.es.js +14 -30
  42. package/textarea/index.umd.js +18 -18
  43. package/time-picker/index.es.js +8 -24
  44. package/time-picker/index.umd.js +9 -9
  45. package/time-select/index.es.js +16 -33
  46. package/time-select/index.umd.js +14 -14
  47. package/tree/index.es.js +10 -27
  48. package/tree/index.umd.js +9 -9
  49. package/types/checkbox/src/checkbox-types.d.ts +0 -2
  50. package/types/date-picker-pro/src/date-picker-pro-types.d.ts +13 -0
  51. package/types/date-picker-pro/src/range-date-picker-types.d.ts +4 -0
  52. package/types/form/src/components/form-item/form-item-types.d.ts +4 -0
  53. package/types/form/src/components/form-item/form-item.d.ts +9 -0
  54. package/types/search/src/search-types.d.ts +4 -0
  55. package/types/search/src/search.d.ts +9 -0
  56. package/vue-devui.es.js +79 -59
  57. package/vue-devui.umd.js +43 -43
@@ -354,8 +354,7 @@ const commonProps = {
354
354
  default: void 0
355
355
  },
356
356
  size: {
357
- type: String,
358
- default: "md"
357
+ type: String
359
358
  },
360
359
  showGlowStyle: {
361
360
  type: Boolean,
@@ -6082,6 +6081,10 @@ const formItemProps = {
6082
6081
  extraInfo: {
6083
6082
  type: String,
6084
6083
  default: ""
6084
+ },
6085
+ isAsyncValidate: {
6086
+ type: Boolean,
6087
+ default: false
6085
6088
  }
6086
6089
  };
6087
6090
  const FORM_ITEM_TOKEN = "dFormItem";
@@ -6644,7 +6647,6 @@ var FormControl = defineComponent({
6644
6647
  const formControl2 = ref();
6645
6648
  const popoverRef = ref();
6646
6649
  const ns2 = useNamespace("form");
6647
- const showPopoverClick = ref(true);
6648
6650
  const {
6649
6651
  controlClasses,
6650
6652
  controlContainerClasses,
@@ -6668,27 +6670,6 @@ var FormControl = defineComponent({
6668
6670
  }
6669
6671
  return void 0;
6670
6672
  });
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
6673
  return () => createVNode("div", {
6693
6674
  "class": controlClasses.value,
6694
6675
  "ref": formControl2
@@ -6696,7 +6677,7 @@ var FormControl = defineComponent({
6696
6677
  "class": controlContainerClasses.value
6697
6678
  }, [createVNode(Popover, {
6698
6679
  "ref": popoverRef,
6699
- "is-open": showPopover.value && showPopoverClick.value,
6680
+ "is-open": showPopover.value,
6700
6681
  "trigger": "manually",
6701
6682
  "content": errorMessage.value,
6702
6683
  "pop-type": "error",
@@ -7826,7 +7807,9 @@ function useFormItemValidate(props, _rules) {
7826
7807
  callback == null ? void 0 : callback(true);
7827
7808
  return true;
7828
7809
  }
7829
- validateState.value = "pending";
7810
+ if (props.isAsyncValidate) {
7811
+ validateState.value = "pending";
7812
+ }
7830
7813
  return execValidate(rules2).then(() => {
7831
7814
  callback == null ? void 0 : callback(true);
7832
7815
  return true;
@@ -8088,7 +8071,7 @@ function useCheckboxGroup(props, ctx) {
8088
8071
  formItemContext == null ? void 0 : formItemContext.validate("change").catch(() => {
8089
8072
  });
8090
8073
  }, { deep: true });
8091
- const checkboxGroupSize = computed(() => props.size || (formContext == null ? void 0 : formContext.size) || "");
8074
+ const checkboxGroupSize = computed(() => props.size || (formContext == null ? void 0 : formContext.size) || "md");
8092
8075
  provide(checkboxGroupInjectionKey, {
8093
8076
  disabled: toRef(props, "disabled"),
8094
8077
  isShowTitle: toRef(props, "isShowTitle"),
@@ -11367,7 +11350,7 @@ function useDataGrid(props, ctx) {
11367
11350
  (_a = scrollRef.value) == null ? void 0 : _a.addEventListener("scroll", onScroll);
11368
11351
  if (typeof window !== "undefined" && scrollRef.value) {
11369
11352
  resizeObserver = new ResizeObserver(() => {
11370
- if (scrollRef.value) {
11353
+ if (scrollRef.value && sliceColumns.value.length) {
11371
11354
  let distance = 0;
11372
11355
  initOriginColumnData();
11373
11356
  distance = scrollRef.value.scrollLeft;