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
@@ -50,6 +50,10 @@ export declare const formItemProps: {
50
50
  type: StringConstructor;
51
51
  default: string;
52
52
  };
53
+ isAsyncValidate: {
54
+ type: BooleanConstructor;
55
+ default: boolean;
56
+ };
53
57
  };
54
58
  export declare type FormItemProps = ExtractPropTypes<typeof formItemProps>;
55
59
  export declare type FormValidateCallback = (isValid: boolean, invalidFields?: ValidateFieldsError) => void;
@@ -35,6 +35,10 @@ declare const _default: import("vue").DefineComponent<{
35
35
  type: StringConstructor;
36
36
  default: string;
37
37
  };
38
+ isAsyncValidate: {
39
+ type: BooleanConstructor;
40
+ default: boolean;
41
+ };
38
42
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
39
43
  label: {
40
44
  type: StringConstructor;
@@ -71,11 +75,16 @@ declare const _default: import("vue").DefineComponent<{
71
75
  type: StringConstructor;
72
76
  default: string;
73
77
  };
78
+ isAsyncValidate: {
79
+ type: BooleanConstructor;
80
+ default: boolean;
81
+ };
74
82
  }>>, {
75
83
  required: boolean;
76
84
  field: string;
77
85
  extraInfo: string;
78
86
  showFeedback: boolean;
79
87
  helpTips: string | import("./form-item-types").HelpTips;
88
+ isAsyncValidate: boolean;
80
89
  }, {}>;
81
90
  export default _default;
@@ -49,6 +49,10 @@ export declare const searchProps: {
49
49
  readonly type: PropType<(v: string) => void>;
50
50
  readonly default: undefined;
51
51
  };
52
+ readonly showGlowStyle: {
53
+ readonly type: BooleanConstructor;
54
+ readonly default: true;
55
+ };
52
56
  };
53
57
  export declare type SearchProps = ExtractPropTypes<typeof searchProps>;
54
58
  export interface UseSearchClassTypes {
@@ -47,6 +47,10 @@ declare const _default: import("vue").DefineComponent<{
47
47
  readonly type: import("vue").PropType<(v: string) => void>;
48
48
  readonly default: undefined;
49
49
  };
50
+ readonly showGlowStyle: {
51
+ readonly type: BooleanConstructor;
52
+ readonly default: true;
53
+ };
50
54
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("search" | "update:modelValue")[], "search" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
51
55
  readonly size: {
52
56
  readonly type: import("vue").PropType<import("./search-types").Size>;
@@ -95,6 +99,10 @@ declare const _default: import("vue").DefineComponent<{
95
99
  readonly type: import("vue").PropType<(v: string) => void>;
96
100
  readonly default: undefined;
97
101
  };
102
+ readonly showGlowStyle: {
103
+ readonly type: BooleanConstructor;
104
+ readonly default: true;
105
+ };
98
106
  }>> & {
99
107
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
100
108
  onSearch?: ((...args: any[]) => any) | undefined;
@@ -105,6 +113,7 @@ declare const _default: import("vue").DefineComponent<{
105
113
  readonly cssClass: string;
106
114
  readonly modelValue: string;
107
115
  readonly delay: number;
116
+ readonly showGlowStyle: boolean;
108
117
  readonly 'onUpdate:modelValue': (v: string) => void;
109
118
  readonly maxLength: number;
110
119
  readonly isKeyupSearch: boolean;
@@ -1,5 +1,6 @@
1
1
  import type { ComputedRef, ExtractPropTypes, PropType, Ref } from 'vue';
2
- export declare type BasePlacement = 'top' | 'right' | 'bottom' | 'left';
2
+ export declare type Alignment = 'start' | 'end';
3
+ export declare type BasePlacement = 'top' | 'right' | 'bottom' | 'left' | 'top-start' | 'top-end' | 'right-start' | 'right-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end';
3
4
  export declare const tooltipProps: {
4
5
  content: {
5
6
  type: StringConstructor;
@@ -9,6 +10,10 @@ export declare const tooltipProps: {
9
10
  type: PropType<BasePlacement | BasePlacement[]>;
10
11
  default: string;
11
12
  };
13
+ align: {
14
+ type: PropType<Alignment> | null;
15
+ default: null;
16
+ };
12
17
  showAnimation: {
13
18
  type: BooleanConstructor;
14
19
  default: boolean;
@@ -33,6 +38,14 @@ export declare const tooltipProps: {
33
38
  type: NumberConstructor;
34
39
  default: number;
35
40
  };
41
+ overlayClass: {
42
+ type: StringConstructor;
43
+ default: string;
44
+ };
45
+ teleport: {
46
+ type: PropType<string | import("vue").RendererElement | null | undefined>;
47
+ default: string;
48
+ };
36
49
  };
37
50
  export declare type TooltipProps = ExtractPropTypes<typeof tooltipProps>;
38
51
  export declare type UseTooltipFn = {
@@ -8,6 +8,10 @@ declare const _default: import("vue").DefineComponent<{
8
8
  type: import("vue").PropType<import("./tooltip-types").BasePlacement | import("./tooltip-types").BasePlacement[]>;
9
9
  default: string;
10
10
  };
11
+ align: {
12
+ type: import("vue").PropType<import("./tooltip-types").Alignment> | null;
13
+ default: null;
14
+ };
11
15
  showAnimation: {
12
16
  type: BooleanConstructor;
13
17
  default: boolean;
@@ -32,6 +36,14 @@ declare const _default: import("vue").DefineComponent<{
32
36
  type: NumberConstructor;
33
37
  default: number;
34
38
  };
39
+ overlayClass: {
40
+ type: StringConstructor;
41
+ default: string;
42
+ };
43
+ teleport: {
44
+ type: import("vue").PropType<string | import("vue").RendererElement | null | undefined>;
45
+ default: string;
46
+ };
35
47
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
36
48
  content: {
37
49
  type: StringConstructor;
@@ -41,6 +53,10 @@ declare const _default: import("vue").DefineComponent<{
41
53
  type: import("vue").PropType<import("./tooltip-types").BasePlacement | import("./tooltip-types").BasePlacement[]>;
42
54
  default: string;
43
55
  };
56
+ align: {
57
+ type: import("vue").PropType<import("./tooltip-types").Alignment> | null;
58
+ default: null;
59
+ };
44
60
  showAnimation: {
45
61
  type: BooleanConstructor;
46
62
  default: boolean;
@@ -65,14 +81,25 @@ declare const _default: import("vue").DefineComponent<{
65
81
  type: NumberConstructor;
66
82
  default: number;
67
83
  };
84
+ overlayClass: {
85
+ type: StringConstructor;
86
+ default: string;
87
+ };
88
+ teleport: {
89
+ type: import("vue").PropType<string | import("vue").RendererElement | null | undefined>;
90
+ default: string;
91
+ };
68
92
  }>>, {
69
93
  content: string;
70
94
  position: import("./tooltip-types").BasePlacement | import("./tooltip-types").BasePlacement[];
71
95
  disabled: boolean;
96
+ align: import("./tooltip-types").Alignment;
72
97
  showAnimation: boolean;
73
98
  mouseEnterDelay: number;
74
99
  mouseLeaveDelay: number;
100
+ overlayClass: string;
75
101
  enterable: boolean;
76
102
  hideAfter: number;
103
+ teleport: string | import("vue").RendererElement | null | undefined;
77
104
  }, {}>;
78
105
  export default _default;
package/vue-devui.es.js CHANGED
@@ -7746,6 +7746,10 @@ const formItemProps = {
7746
7746
  extraInfo: {
7747
7747
  type: String,
7748
7748
  default: ""
7749
+ },
7750
+ isAsyncValidate: {
7751
+ type: Boolean,
7752
+ default: false
7749
7753
  }
7750
7754
  };
7751
7755
  const FORM_ITEM_TOKEN = "dFormItem";
@@ -8577,7 +8581,6 @@ var FormControl = defineComponent({
8577
8581
  const formControl2 = ref();
8578
8582
  const popoverRef = ref();
8579
8583
  const ns2 = useNamespace("form");
8580
- const showPopoverClick = ref(true);
8581
8584
  const {
8582
8585
  controlClasses,
8583
8586
  controlContainerClasses,
@@ -8601,27 +8604,6 @@ var FormControl = defineComponent({
8601
8604
  }
8602
8605
  return void 0;
8603
8606
  });
8604
- const onDocumentClick = (e) => {
8605
- const composedPath = e.composedPath();
8606
- if (composedPath.includes(popoverRef.value.triggerEl)) {
8607
- showPopoverClick.value = true;
8608
- } else {
8609
- showPopoverClick.value = false;
8610
- }
8611
- };
8612
- watch(showPopover, (val) => {
8613
- if (val) {
8614
- setTimeout(() => {
8615
- document.addEventListener("click", onDocumentClick);
8616
- });
8617
- } else {
8618
- showPopoverClick.value = true;
8619
- document.removeEventListener("click", onDocumentClick);
8620
- }
8621
- });
8622
- onUnmounted(() => {
8623
- document.removeEventListener("click", onDocumentClick);
8624
- });
8625
8607
  return () => createVNode("div", {
8626
8608
  "class": controlClasses.value,
8627
8609
  "ref": formControl2
@@ -8629,7 +8611,7 @@ var FormControl = defineComponent({
8629
8611
  "class": controlContainerClasses.value
8630
8612
  }, [createVNode(Popover, {
8631
8613
  "ref": popoverRef,
8632
- "is-open": showPopover.value && showPopoverClick.value,
8614
+ "is-open": showPopover.value,
8633
8615
  "trigger": "manually",
8634
8616
  "content": errorMessage.value,
8635
8617
  "pop-type": "error",
@@ -9759,7 +9741,9 @@ function useFormItemValidate(props, _rules) {
9759
9741
  callback == null ? void 0 : callback(true);
9760
9742
  return true;
9761
9743
  }
9762
- validateState.value = "pending";
9744
+ if (props.isAsyncValidate) {
9745
+ validateState.value = "pending";
9746
+ }
9763
9747
  return execValidate(rules2).then(() => {
9764
9748
  callback == null ? void 0 : callback(true);
9765
9749
  return true;
@@ -22948,10 +22932,10 @@ function useDataGrid(props, ctx2) {
22948
22932
  scrollYParams.defaultSortRowData = scrollYParams.originRowData;
22949
22933
  bodyContentHeight.value = bodyTotalHeight;
22950
22934
  };
22951
- const initVirtualRowData = (distance = 0) => {
22935
+ const initVirtualRowData = (distance) => {
22952
22936
  scrollYParams.distance = distance;
22953
22937
  scrollYParams.renderCountPerScreen = Math.ceil(scrollRef.value.clientHeight / rowHeight);
22954
- scrollYParams.scrollScaleY = [0, scrollYParams.renderCountPerScreen * rowHeight];
22938
+ scrollYParams.scrollScaleY = [distance, scrollYParams.renderCountPerScreen * rowHeight];
22955
22939
  calcVirtualRowData(scrollYParams);
22956
22940
  };
22957
22941
  const initOriginColumnData = () => {
@@ -23085,7 +23069,7 @@ function useDataGrid(props, ctx2) {
23085
23069
  (_a2 = scrollRef.value) == null ? void 0 : _a2.addEventListener("scroll", onScroll2);
23086
23070
  if (typeof window !== "undefined" && scrollRef.value) {
23087
23071
  resizeObserver = new ResizeObserver(() => {
23088
- if (scrollRef.value) {
23072
+ if (scrollRef.value && sliceColumns.value.length) {
23089
23073
  let distance = 0;
23090
23074
  initOriginColumnData();
23091
23075
  distance = scrollRef.value.scrollLeft;
@@ -36242,7 +36226,6 @@ function useEditorMd(props, ctx2) {
36242
36226
  editorIns.on("cursorActivity", lodash.exports.throttle(cursorActivityHandler, hintConfig.value && hintConfig.value.throttleTime || 300));
36243
36227
  editorIns.setSize("auto", "100%");
36244
36228
  refreshEditorCursor();
36245
- editorIns.setCursor(editorIns.lineCount(), 0);
36246
36229
  ctx2.emit("afterEditorInit", editorIns);
36247
36230
  editorIns.on("change", onChange);
36248
36231
  editorIns.on("scroll", onScroll2);
@@ -36489,6 +36472,10 @@ const tooltipProps = {
36489
36472
  type: [String, Array],
36490
36473
  default: "top"
36491
36474
  },
36475
+ align: {
36476
+ type: String,
36477
+ default: null
36478
+ },
36492
36479
  showAnimation: {
36493
36480
  type: Boolean,
36494
36481
  default: true
@@ -36512,6 +36499,14 @@ const tooltipProps = {
36512
36499
  hideAfter: {
36513
36500
  type: Number,
36514
36501
  default: 0
36502
+ },
36503
+ overlayClass: {
36504
+ type: String,
36505
+ default: ""
36506
+ },
36507
+ teleport: {
36508
+ type: [String, Object],
36509
+ default: "body"
36515
36510
  }
36516
36511
  };
36517
36512
  const transformOriginMap = {
@@ -36591,7 +36586,10 @@ var Tooltip = defineComponent({
36591
36586
  }) {
36592
36587
  const {
36593
36588
  showAnimation,
36594
- content: content2
36589
+ content: content2,
36590
+ align,
36591
+ overlayClass,
36592
+ teleport
36595
36593
  } = toRefs(props);
36596
36594
  const origin = ref();
36597
36595
  const tooltipRef = ref();
@@ -36608,7 +36606,8 @@ var Tooltip = defineComponent({
36608
36606
  const className2 = computed(() => ({
36609
36607
  [ns2.b()]: true,
36610
36608
  [ns2.m(placement.value)]: true,
36611
- [ns2.m("with-content")]: slots.content
36609
+ [ns2.m("with-content")]: slots.content,
36610
+ [overlayClass.value]: true
36612
36611
  }));
36613
36612
  provide(POPPER_TRIGGER_TOKEN, origin);
36614
36613
  return () => createVNode(Fragment, null, [createVNode(PopperTrigger, null, {
@@ -36617,7 +36616,7 @@ var Tooltip = defineComponent({
36617
36616
  return [(_a2 = slots.default) == null ? void 0 : _a2.call(slots)];
36618
36617
  }
36619
36618
  }), createVNode(Teleport, {
36620
- "to": "body"
36619
+ "to": teleport.value
36621
36620
  }, {
36622
36621
  default: () => [createVNode(Transition, {
36623
36622
  "name": showAnimation.value ? ns2.m(`fade-${placement.value}`) : ""
@@ -36629,6 +36628,7 @@ var Tooltip = defineComponent({
36629
36628
  "class": className2.value,
36630
36629
  "origin": origin.value,
36631
36630
  "position": positionArr.value,
36631
+ "align": align.value,
36632
36632
  "offset": 6,
36633
36633
  "show-arrow": true,
36634
36634
  "style": overlayStyles.value,
@@ -41445,27 +41445,33 @@ var ModalBody = defineComponent({
41445
41445
  });
41446
41446
  function CloseIcon() {
41447
41447
  return createVNode("svg", {
41448
- "width": "16px",
41449
- "height": "16px",
41448
+ "width": "18px",
41449
+ "height": "18px",
41450
41450
  "viewBox": "0 0 16 16",
41451
41451
  "version": "1.1",
41452
41452
  "xmlns": "http://www.w3.org/2000/svg"
41453
41453
  }, [createVNode("g", {
41454
+ "id": "modal-close",
41454
41455
  "stroke": "none",
41455
41456
  "stroke-width": "1",
41456
41457
  "fill": "none",
41457
41458
  "fill-rule": "evenodd"
41459
+ }, [createVNode("g", {
41460
+ "transform": "translate(3.000000, 3.000000)",
41461
+ "fill": "#71757F",
41462
+ "fill-rule": "nonzero",
41463
+ "id": "modal-close-road"
41458
41464
  }, [createVNode("path", {
41459
- "d": `M14.6887175,1.25368865 C15.0770801,1.64205125 15.0121881,2.34244569 14.544513,2.81012074 L9.383,7.971 L14.544513,13.1322854
41460
- C14.9787827,13.5665551 15.0657548,14.2014859 14.7650189,14.6009195 L14.6887175,14.6887175 C14.3003549,15.0770801
41461
- 13.5999604,15.0121881 13.1322854,14.544513 L13.1322854,14.544513 L7.971,9.383 L2.81012075,14.544513 C2.3424457,15.0121881
41462
- 1.64205125,15.0770801 1.25368865,14.6887175 C0.865326051,14.3003549 0.930218063,13.5999605 1.39789313,13.1322854 L6.558,7.971
41463
- L1.39789311,2.81012074 C0.963623424,2.37585105 0.876651354,1.74092026 1.17738727,1.34148668 L1.25368865,1.25368865
41464
- C1.64205125,0.865326051 2.34244569,0.930218063 2.81012074,1.39789311 L2.81012074,1.39789311 L7.971,6.558 L13.1322854,1.39789311
41465
- C13.5999605,0.930218063 14.3003549,0.865326051 14.6887175,1.25368865 Z`,
41466
- "fill": "#8A8E99",
41467
- "fill-rule": "nonzero"
41468
- }, null)])]);
41465
+ "d": `M-0.353553391,-0.353553391 C-0.179987039,-0.527119742 0.0894373624,-0.546404893 0.284305503,-0.411408841 L0.353553391,-0.353553391
41466
+ L10.3535534,9.64644661 C10.5488155,9.84170876 10.5488155,10.1582912 10.3535534,10.3535534 C10.179987,10.5271197 9.91056264,10.5464049
41467
+ 9.7156945,10.4114088 L9.64644661,10.3535534 L-0.353553391,0.353553391 C-0.548815536,0.158291245 -0.548815536,-0.158291245
41468
+ -0.353553391,-0.353553391 Z`
41469
+ }, null), createVNode("path", {
41470
+ "d": `M9.64644661,-0.353553391 C9.84170876,-0.548815536 10.1582912,-0.548815536 10.3535534,-0.353553391 C10.5271197,-0.179987039
41471
+ 10.5464049,0.0894373624 10.4114088,0.284305503 L10.3535534,0.353553391 L0.353553391,10.3535534 C0.158291245,10.5488155
41472
+ -0.158291245,10.5488155 -0.353553391,10.3535534 C-0.527119742,10.179987 -0.546404893,9.91056264 -0.411408841,9.7156945 L-0.353553391,9.64644661
41473
+ L9.64644661,-0.353553391 Z`
41474
+ }, null)])])]);
41469
41475
  }
41470
41476
  var modal = "";
41471
41477
  var Modal = defineComponent({
@@ -45456,6 +45462,10 @@ const searchProps = {
45456
45462
  "onUpdate:modelValue": {
45457
45463
  type: Function,
45458
45464
  default: void 0
45465
+ },
45466
+ showGlowStyle: {
45467
+ type: Boolean,
45468
+ default: true
45459
45469
  }
45460
45470
  };
45461
45471
  const useSearchClass = (props, isFocus) => {
@@ -45471,6 +45481,7 @@ const useSearchClass = (props, isFocus) => {
45471
45481
  [ns2.m("focus")]: isFocus.value,
45472
45482
  [ns2.m("disabled")]: props.disabled,
45473
45483
  [ns2.m("no-border")]: props.noBorder,
45484
+ [ns2.m("glow-style")]: props.showGlowStyle,
45474
45485
  [ns2.m(searchSize.value)]: !!searchSize.value,
45475
45486
  [ns2.m(props.iconPosition)]: ICON_POSITION[props.iconPosition]
45476
45487
  }));
@@ -45569,6 +45580,7 @@ var DSearch = defineComponent({
45569
45580
  maxlength: props.maxLength,
45570
45581
  modelValue: keywords.value,
45571
45582
  placeholder: props.placeholder || t("placeholder"),
45583
+ showGlowStyle: false,
45572
45584
  onKeydown: onInputKeydown,
45573
45585
  "onUpdate:modelValue": onInputUpdate,
45574
45586
  onFocus,
@@ -54320,7 +54332,7 @@ const installs = [
54320
54332
  VirtualListInstall
54321
54333
  ];
54322
54334
  var vueDevui = {
54323
- version: "1.6.8",
54335
+ version: "1.6.10",
54324
54336
  install(app) {
54325
54337
  installs.forEach((p) => app.use(p));
54326
54338
  }