vue-devui 1.6.8 → 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 (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 +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 +11 -27
  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 +20 -4
  12. package/editor-md/index.umd.js +11 -11
  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/splitter/index.es.js +20 -3
  34. package/splitter/index.umd.js +7 -7
  35. package/style.css +1 -1
  36. package/switch/index.es.js +8 -24
  37. package/switch/index.umd.js +15 -15
  38. package/table/index.es.js +28 -27
  39. package/table/index.umd.js +11 -11
  40. package/textarea/index.es.js +14 -30
  41. package/textarea/index.umd.js +18 -18
  42. package/time-picker/index.es.js +8 -24
  43. package/time-picker/index.umd.js +9 -9
  44. package/time-select/index.es.js +14 -30
  45. package/time-select/index.umd.js +14 -14
  46. package/tooltip/index.es.js +20 -3
  47. package/tooltip/index.umd.js +12 -12
  48. package/tree/index.es.js +8 -24
  49. package/tree/index.umd.js +9 -9
  50. package/types/form/src/components/form-item/form-item-types.d.ts +4 -0
  51. package/types/form/src/components/form-item/form-item.d.ts +9 -0
  52. package/types/search/src/search-types.d.ts +4 -0
  53. package/types/search/src/search.d.ts +9 -0
  54. package/types/tooltip/src/tooltip-types.d.ts +14 -1
  55. package/types/tooltip/src/tooltip.d.ts +27 -0
  56. package/vue-devui.es.js +56 -44
  57. package/vue-devui.umd.js +43 -43
package/input/index.es.js CHANGED
@@ -321,6 +321,10 @@ const formItemProps = {
321
321
  extraInfo: {
322
322
  type: String,
323
323
  default: ""
324
+ },
325
+ isAsyncValidate: {
326
+ type: Boolean,
327
+ default: false
324
328
  }
325
329
  };
326
330
  const FORM_ITEM_TOKEN = "dFormItem";
@@ -1634,7 +1638,7 @@ var lodash = { exports: {} };
1634
1638
  if (typeof func != "function") {
1635
1639
  throw new TypeError2(FUNC_ERROR_TEXT);
1636
1640
  }
1637
- return setTimeout2(function() {
1641
+ return setTimeout(function() {
1638
1642
  func.apply(undefined$1, args);
1639
1643
  }, wait);
1640
1644
  }
@@ -3443,7 +3447,7 @@ var lodash = { exports: {} };
3443
3447
  return object4[key];
3444
3448
  }
3445
3449
  var setData = shortOut(baseSetData);
3446
- var setTimeout2 = ctxSetTimeout || function(func, wait) {
3450
+ var setTimeout = ctxSetTimeout || function(func, wait) {
3447
3451
  return root.setTimeout(func, wait);
3448
3452
  };
3449
3453
  var setToString = shortOut(baseSetToString);
@@ -4235,7 +4239,7 @@ var lodash = { exports: {} };
4235
4239
  }
4236
4240
  function leadingEdge(time) {
4237
4241
  lastInvokeTime = time;
4238
- timerId = setTimeout2(timerExpired, wait);
4242
+ timerId = setTimeout(timerExpired, wait);
4239
4243
  return leading ? invokeFunc(time) : result2;
4240
4244
  }
4241
4245
  function remainingWait(time) {
@@ -4251,7 +4255,7 @@ var lodash = { exports: {} };
4251
4255
  if (shouldInvoke(time)) {
4252
4256
  return trailingEdge(time);
4253
4257
  }
4254
- timerId = setTimeout2(timerExpired, remainingWait(time));
4258
+ timerId = setTimeout(timerExpired, remainingWait(time));
4255
4259
  }
4256
4260
  function trailingEdge(time) {
4257
4261
  timerId = undefined$1;
@@ -4282,12 +4286,12 @@ var lodash = { exports: {} };
4282
4286
  }
4283
4287
  if (maxing) {
4284
4288
  clearTimeout(timerId);
4285
- timerId = setTimeout2(timerExpired, wait);
4289
+ timerId = setTimeout(timerExpired, wait);
4286
4290
  return invokeFunc(lastCallTime);
4287
4291
  }
4288
4292
  }
4289
4293
  if (timerId === undefined$1) {
4290
- timerId = setTimeout2(timerExpired, wait);
4294
+ timerId = setTimeout(timerExpired, wait);
4291
4295
  }
4292
4296
  return result2;
4293
4297
  }
@@ -6766,7 +6770,6 @@ var FormControl = defineComponent({
6766
6770
  const formControl2 = ref();
6767
6771
  const popoverRef = ref();
6768
6772
  const ns2 = useNamespace("form");
6769
- const showPopoverClick = ref(true);
6770
6773
  const {
6771
6774
  controlClasses,
6772
6775
  controlContainerClasses,
@@ -6790,27 +6793,6 @@ var FormControl = defineComponent({
6790
6793
  }
6791
6794
  return void 0;
6792
6795
  });
6793
- const onDocumentClick = (e) => {
6794
- const composedPath = e.composedPath();
6795
- if (composedPath.includes(popoverRef.value.triggerEl)) {
6796
- showPopoverClick.value = true;
6797
- } else {
6798
- showPopoverClick.value = false;
6799
- }
6800
- };
6801
- watch(showPopover, (val) => {
6802
- if (val) {
6803
- setTimeout(() => {
6804
- document.addEventListener("click", onDocumentClick);
6805
- });
6806
- } else {
6807
- showPopoverClick.value = true;
6808
- document.removeEventListener("click", onDocumentClick);
6809
- }
6810
- });
6811
- onUnmounted(() => {
6812
- document.removeEventListener("click", onDocumentClick);
6813
- });
6814
6796
  return () => createVNode("div", {
6815
6797
  "class": controlClasses.value,
6816
6798
  "ref": formControl2
@@ -6818,7 +6800,7 @@ var FormControl = defineComponent({
6818
6800
  "class": controlContainerClasses.value
6819
6801
  }, [createVNode(Popover, {
6820
6802
  "ref": popoverRef,
6821
- "is-open": showPopover.value && showPopoverClick.value,
6803
+ "is-open": showPopover.value,
6822
6804
  "trigger": "manually",
6823
6805
  "content": errorMessage.value,
6824
6806
  "pop-type": "error",
@@ -7948,7 +7930,9 @@ function useFormItemValidate(props, _rules) {
7948
7930
  callback == null ? void 0 : callback(true);
7949
7931
  return true;
7950
7932
  }
7951
- validateState.value = "pending";
7933
+ if (props.isAsyncValidate) {
7934
+ validateState.value = "pending";
7935
+ }
7952
7936
  return execValidate(rules2).then(() => {
7953
7937
  callback == null ? void 0 : callback(true);
7954
7938
  return true;