@farris/ui-vue 1.0.0-beta.3 → 1.0.0-beta.5

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 (197) hide show
  1. package/accordion/package.json +3 -2
  2. package/avatar/package.json +3 -2
  3. package/button/package.json +3 -2
  4. package/button-edit/package.json +3 -2
  5. package/checkbox/package.json +3 -2
  6. package/combo-list/package.json +3 -2
  7. package/data-grid/index.esm.js +1 -2
  8. package/data-grid/index.umd.js +1 -1
  9. package/data-grid/package.json +3 -2
  10. package/date-picker/package.json +3 -2
  11. package/farris.all.esm.js +3 -3
  12. package/farris.all.umd.js +1 -1
  13. package/list-view/package.json +3 -2
  14. package/message-box/package.json +3 -2
  15. package/modal/package.json +3 -2
  16. package/notify/package.json +3 -2
  17. package/package.json +3 -2
  18. package/pagination/package.json +3 -2
  19. package/popover/package.json +3 -2
  20. package/radio-group/package.json +3 -2
  21. package/section/package.json +3 -2
  22. package/style.css +11 -1
  23. package/switch/package.json +3 -2
  24. package/tabs/package.json +3 -2
  25. package/text/package.json +3 -2
  26. package/tooltip/package.json +3 -2
  27. package/types/accordion/index.d.ts +25 -0
  28. package/types/accordion/src/accordion.component.d.ts +70 -0
  29. package/types/accordion/src/accordion.props.d.ts +50 -0
  30. package/types/accordion/src/components/accordion-item.component.d.ts +38 -0
  31. package/types/accordion/src/components/accordion-item.props.d.ts +34 -0
  32. package/types/avatar/index.d.ts +23 -0
  33. package/types/avatar/src/avatar.component.d.ts +109 -0
  34. package/types/avatar/src/avatar.props.d.ts +96 -0
  35. package/types/avatar/src/composition/types.d.ts +31 -0
  36. package/types/avatar/src/composition/use-image.d.ts +19 -0
  37. package/types/button/index.d.ts +24 -0
  38. package/types/button/src/button-group.component.d.ts +106 -0
  39. package/types/button/src/button-group.props.d.ts +106 -0
  40. package/types/button/src/button.component.d.ts +34 -0
  41. package/types/button/src/button.props.d.ts +47 -0
  42. package/types/button/src/composition/types-group.d.ts +24 -0
  43. package/types/button/src/composition/types.d.ts +24 -0
  44. package/types/button/src/composition/use-button-group.d.ts +19 -0
  45. package/types/button/src/composition/use-button.d.ts +19 -0
  46. package/types/button-edit/index.d.ts +23 -0
  47. package/types/button-edit/src/button-edit.props.d.ts +135 -0
  48. package/types/button-edit/src/composition/types.d.ts +118 -0
  49. package/types/button-edit/src/composition/use-button.d.ts +19 -0
  50. package/types/button-edit/src/composition/use-clear.d.ts +19 -0
  51. package/types/button-edit/src/composition/use-text-box.d.ts +19 -0
  52. package/types/checkbox/index.d.ts +23 -0
  53. package/types/checkbox/src/checkbox-group.component.d.ts +148 -0
  54. package/types/checkbox/src/checkbox-group.props.d.ts +123 -0
  55. package/types/checkbox/src/composition/types.d.ts +46 -0
  56. package/types/checkbox/src/composition/use-checkbox-group.d.ts +19 -0
  57. package/types/combo-list/index.d.ts +25 -0
  58. package/types/combo-list/src/combo-list.props.d.ts +290 -0
  59. package/types/combo-list/src/components/option.component.d.ts +39 -0
  60. package/types/combo-list/src/components/options.component.d.ts +10 -0
  61. package/types/combo-list/src/composition/index.d.ts +18 -0
  62. package/types/combo-list/src/composition/use-combo-list.d.ts +30 -0
  63. package/types/combo-list/src/composition/use-option.d.ts +19 -0
  64. package/types/combo-list/src/composition/use-options.d.ts +2 -0
  65. package/types/combo-list/src/composition/use-panel.d.ts +8 -0
  66. package/types/combo-list/src/const.d.ts +40 -0
  67. package/types/combo-list/src/types.d.ts +186 -0
  68. package/types/data-grid/index.d.ts +23 -0
  69. package/types/data-grid/src/components/data/data-area.component.d.ts +21 -0
  70. package/types/data-grid/src/components/editors/date-picker.component.d.ts +2 -0
  71. package/types/data-grid/src/components/editors/text-area-editor.component.d.ts +2 -0
  72. package/types/data-grid/src/components/editors/text-editor.component.d.ts +17 -0
  73. package/types/data-grid/src/components/header/data-grid-header.component.d.ts +22 -0
  74. package/types/data-grid/src/components/pagination/data-grid-pagination.component.d.ts +5 -0
  75. package/types/data-grid/src/components/scrollbar/horizontal-scrollbar.component.d.ts +21 -0
  76. package/types/data-grid/src/components/scrollbar/vertical-scrollbar.component.d.ts +21 -0
  77. package/types/data-grid/src/components/sidebar/data-grid-sidebar.component.d.ts +21 -0
  78. package/types/data-grid/src/components/summary/data-grid-summary.component.d.ts +5 -0
  79. package/types/data-grid/src/composition/types.d.ts +175 -0
  80. package/types/data-grid/src/composition/use-column.d.ts +17 -0
  81. package/types/data-grid/src/composition/use-data-view.d.ts +19 -0
  82. package/types/data-grid/src/composition/use-edit.d.ts +18 -0
  83. package/types/data-grid/src/composition/use-fit-column.d.ts +20 -0
  84. package/types/data-grid/src/composition/use-group-column.d.ts +22 -0
  85. package/types/data-grid/src/composition/use-group-data.d.ts +3 -0
  86. package/types/data-grid/src/composition/use-positon-style.d.ts +20 -0
  87. package/types/data-grid/src/composition/use-resize.d.ts +20 -0
  88. package/types/data-grid/src/composition/use-row.d.ts +3 -0
  89. package/types/data-grid/src/composition/use-sidebar.d.ts +3 -0
  90. package/types/data-grid/src/composition/use-virtual-scroll.d.ts +20 -0
  91. package/types/data-grid/src/composition/use-visual-data.d.ts +19 -0
  92. package/types/data-grid/src/data-grid.component.d.ts +278 -0
  93. package/types/data-grid/src/data-grid.props.d.ts +650 -0
  94. package/types/date-picker/index.d.ts +28 -0
  95. package/types/date-picker/src/components/calendar/calendar.component.d.ts +166 -0
  96. package/types/date-picker/src/components/calendar/calendar.props.d.ts +94 -0
  97. package/types/date-picker/src/components/calendar-navbar/calendar-navbar.component.d.ts +138 -0
  98. package/types/date-picker/src/components/calendar-navbar/calendar-navbar.props.d.ts +81 -0
  99. package/types/date-picker/src/components/date-picker-container/date-picker-container.component.d.ts +626 -0
  100. package/types/date-picker/src/components/date-picker-container/date-picker-container.props.d.ts +306 -0
  101. package/types/date-picker/src/components/month/month.component.d.ts +86 -0
  102. package/types/date-picker/src/components/month/month.props.d.ts +57 -0
  103. package/types/date-picker/src/components/year/year.component.d.ts +86 -0
  104. package/types/date-picker/src/components/year/year.props.d.ts +57 -0
  105. package/types/date-picker/src/composition/types.d.ts +102 -0
  106. package/types/date-picker/src/composition/use-calendar.d.ts +2 -0
  107. package/types/date-picker/src/composition/use-compare.d.ts +2 -0
  108. package/types/date-picker/src/composition/use-date.d.ts +2 -0
  109. package/types/date-picker/src/composition/use-disable-date.d.ts +18 -0
  110. package/types/date-picker/src/composition/use-disable-month.d.ts +2 -0
  111. package/types/date-picker/src/composition/use-event.d.ts +45 -0
  112. package/types/date-picker/src/composition/use-mark.d.ts +2 -0
  113. package/types/date-picker/src/composition/use-month.d.ts +2 -0
  114. package/types/date-picker/src/composition/use-number.d.ts +2 -0
  115. package/types/date-picker/src/composition/use-year.d.ts +2 -0
  116. package/types/date-picker/src/date-picker.props.d.ts +168 -0
  117. package/types/date-picker/src/types/calendar.d.ts +30 -0
  118. package/types/date-picker/src/types/common.d.ts +42 -0
  119. package/types/date-picker/src/types/date-model.d.ts +38 -0
  120. package/types/date-picker/src/types/month.d.ts +48 -0
  121. package/types/date-picker/src/types/year.d.ts +24 -0
  122. package/types/index.d.ts +20 -0
  123. package/types/list-view/index.d.ts +23 -0
  124. package/types/list-view/src/components/list-view-checkbox.component.d.ts +32 -0
  125. package/types/list-view/src/components/list-view-checkbox.props.d.ts +31 -0
  126. package/types/list-view/src/list-view.props.d.ts +44 -0
  127. package/types/message-box/index.d.ts +24 -0
  128. package/types/message-box/src/composition/types.d.ts +18 -0
  129. package/types/message-box/src/composition/use-copy.d.ts +18 -0
  130. package/types/message-box/src/message-box.component.d.ts +72 -0
  131. package/types/message-box/src/message-box.props.d.ts +52 -0
  132. package/types/modal/index.d.ts +23 -0
  133. package/types/modal/src/modal.component.d.ts +104 -0
  134. package/types/modal/src/modal.props.d.ts +72 -0
  135. package/types/notify/index.d.ts +26 -0
  136. package/types/notify/src/components/toast.component.d.ts +21 -0
  137. package/types/notify/src/components/toast.props.d.ts +27 -0
  138. package/types/notify/src/notify.props.d.ts +99 -0
  139. package/types/number-range/index.d.ts +23 -0
  140. package/types/number-range/src/composition/types.d.ts +52 -0
  141. package/types/number-range/src/composition/use-data.d.ts +19 -0
  142. package/types/number-range/src/composition/use-util.d.ts +19 -0
  143. package/types/number-range/src/number-range.component.d.ts +247 -0
  144. package/types/number-range/src/number-range.props.d.ts +216 -0
  145. package/types/number-spinner/index.d.ts +23 -0
  146. package/types/number-spinner/src/composition/types.d.ts +52 -0
  147. package/types/number-spinner/src/composition/use-data.d.ts +19 -0
  148. package/types/number-spinner/src/composition/use-util.d.ts +19 -0
  149. package/types/number-spinner/src/number-spinner.component.d.ts +202 -0
  150. package/types/number-spinner/src/number-spinner.props.d.ts +181 -0
  151. package/types/overlay/src/overlay.component.d.ts +20 -0
  152. package/types/overlay/src/overlay.props.d.ts +26 -0
  153. package/types/pagination/index.d.ts +23 -0
  154. package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +19 -0
  155. package/types/pagination/src/components/buttons/next-buttons.component.d.ts +20 -0
  156. package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +20 -0
  157. package/types/pagination/src/components/pages/page-info.component.d.ts +19 -0
  158. package/types/pagination/src/components/pages/page-list.component.d.ts +19 -0
  159. package/types/pagination/src/components/pages/page-number.component.d.ts +20 -0
  160. package/types/pagination/src/composition/types.d.ts +24 -0
  161. package/types/pagination/src/composition/use-pages.d.ts +18 -0
  162. package/types/pagination/src/pagination.components.d.ts +41 -0
  163. package/types/pagination/src/pagination.props.d.ts +36 -0
  164. package/types/popover/index.d.ts +24 -0
  165. package/types/popover/src/popover.component.d.ts +26 -0
  166. package/types/popover/src/popover.directive.d.ts +5 -0
  167. package/types/popover/src/popover.props.d.ts +30 -0
  168. package/types/radio-group/index.d.ts +23 -0
  169. package/types/radio-group/src/composition/change-radio.d.ts +19 -0
  170. package/types/radio-group/src/composition/types.d.ts +42 -0
  171. package/types/radio-group/src/radio-group.component.d.ts +91 -0
  172. package/types/radio-group/src/radio-group.props.d.ts +87 -0
  173. package/types/section/index.d.ts +23 -0
  174. package/types/section/src/section.component.d.ts +187 -0
  175. package/types/section/src/section.props.d.ts +117 -0
  176. package/types/switch/index.d.ts +23 -0
  177. package/types/switch/src/switch.component.d.ts +66 -0
  178. package/types/switch/src/switch.props.d.ts +52 -0
  179. package/types/tabs/index.d.ts +25 -0
  180. package/types/tabs/src/components/tab-page.component.d.ts +101 -0
  181. package/types/tabs/src/components/tab-page.props.d.ts +63 -0
  182. package/types/tabs/src/composition/types.d.ts +35 -0
  183. package/types/tabs/src/composition/use-tabs.d.ts +18 -0
  184. package/types/tabs/src/tabs.component.d.ts +149 -0
  185. package/types/tabs/src/tabs.props.d.ts +86 -0
  186. package/types/text/index.d.ts +23 -0
  187. package/types/text/src/text.component.d.ts +14 -0
  188. package/types/text/src/text.props.d.ts +26 -0
  189. package/types/tooltip/index.d.ts +24 -0
  190. package/types/tooltip/src/composition/types.d.ts +45 -0
  191. package/types/tooltip/src/composition/use-adjust-placement.d.ts +20 -0
  192. package/types/tooltip/src/composition/use-adjust-position.d.ts +6 -0
  193. package/types/tooltip/src/composition/use-calculate-position.d.ts +21 -0
  194. package/types/tooltip/src/composition/use-relative.d.ts +19 -0
  195. package/types/tooltip/src/composition/use-tooltip-position.d.ts +22 -0
  196. package/types/tooltip/src/tooltip.component.d.ts +56 -0
  197. package/types/tooltip/src/tooltip.props.d.ts +45 -0
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { BigNumber } from 'bignumber.js';
17
+ export interface UseData {
18
+ onModelChange: (realVal: any, updateOn: string) => void;
19
+ up: (e: Event, target: string) => void;
20
+ down: (e: Event, target: string) => void;
21
+ onFocusTextBox: ($event: Event, targetValue: string) => void;
22
+ onBlurTextBox: ($event: Event, targetValue: string) => void;
23
+ onInput: ($event: Event, updateOn: string) => void;
24
+ onKeyDown: ($event: KeyboardEvent) => void;
25
+ }
26
+ export interface NumberFormatter {
27
+ /** 前置符号 */
28
+ prefix?: string;
29
+ /** 后缀 */
30
+ suffix?: string;
31
+ /** 小数点 */
32
+ decimalSeparator?: string;
33
+ /** 千分位符号 */
34
+ groupSeparator?: string;
35
+ /** 千分位分组 */
36
+ groupSize?: number;
37
+ }
38
+ export interface UseUtil {
39
+ isEmpty: (value: any) => boolean;
40
+ setDisabledState: (isDisabled: boolean) => void;
41
+ cleanNumString: (value: any) => string;
42
+ getPrecision: () => number;
43
+ toFixed: (value: BigNumber | number) => string;
44
+ _getRealValue: (value: BigNumber) => string | number;
45
+ getRealValue: (value: any, target?: string) => string | number;
46
+ isDisableOfBtn: (type: string, value?: any) => boolean;
47
+ buildFormatOptions: () => object;
48
+ _modelChanged: (realVal: any, target?: string) => void;
49
+ validInterval: (bn: BigNumber) => BigNumber;
50
+ format: (value: any) => string;
51
+ _toFormat: (_bgNum: BigNumber, fmt: NumberFormatter) => string;
52
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { UseData } from './types';
17
+ import { NumberRangeProps } from '../number-range.props';
18
+ import { SetupContext, Ref } from 'vue';
19
+ export declare function UseData(props: NumberRangeProps, context: SetupContext, realValue: Ref<number | string | null>, inputValue: Ref, isFocus: Ref<boolean>, formatOptions: Ref, targetValue: Ref<string>, beginValue: Ref<number | string | null>, endValue: Ref<number | string | null>, inputBeginValue: Ref, inputEndValue: Ref): UseData;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { UseUtil } from './types';
17
+ import { NumberRangeProps } from '../number-range.props';
18
+ import { SetupContext, Ref } from 'vue';
19
+ export declare function UseUtil(props: NumberRangeProps, context: SetupContext, realValue: Ref<number | string | null>, formatOptions: Ref, targetValue: Ref<string>, beginValue: Ref<number | string | null>, endValue: Ref<number | string | null>): UseUtil;
@@ -0,0 +1,247 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ id: StringConstructor;
3
+ disabled: {
4
+ type: BooleanConstructor;
5
+ default: boolean;
6
+ };
7
+ readonly: {
8
+ type: BooleanConstructor;
9
+ default: boolean;
10
+ };
11
+ editable: {
12
+ type: BooleanConstructor;
13
+ default: boolean;
14
+ };
15
+ formatter: {
16
+ type: FunctionConstructor;
17
+ };
18
+ parser: {
19
+ type: FunctionConstructor;
20
+ };
21
+ placeholder: {
22
+ type: StringConstructor;
23
+ default: string;
24
+ };
25
+ step: {
26
+ type: NumberConstructor;
27
+ default: number;
28
+ };
29
+ max: {
30
+ type: StringConstructor;
31
+ };
32
+ min: {
33
+ type: StringConstructor;
34
+ };
35
+ bigNumber: {
36
+ type: BooleanConstructor;
37
+ default: boolean;
38
+ };
39
+ showButton: {
40
+ type: BooleanConstructor;
41
+ default: boolean;
42
+ };
43
+ useThousands: {
44
+ type: BooleanConstructor;
45
+ default: boolean;
46
+ };
47
+ textAlign: {
48
+ type: import("vue").PropType<"left" | "right" | "center" | "start" | "end" | "justify">;
49
+ default: string;
50
+ };
51
+ autoDecimal: {
52
+ type: BooleanConstructor;
53
+ default: boolean;
54
+ };
55
+ canNull: {
56
+ type: BooleanConstructor;
57
+ default: boolean;
58
+ };
59
+ precision: {
60
+ type: NumberConstructor;
61
+ default: number;
62
+ };
63
+ prefix: {
64
+ type: StringConstructor;
65
+ default: string;
66
+ };
67
+ suffix: {
68
+ type: StringConstructor;
69
+ default: string;
70
+ };
71
+ decimalSeparator: {
72
+ type: StringConstructor;
73
+ default: string;
74
+ };
75
+ groupSeparator: {
76
+ type: StringConstructor;
77
+ default: string;
78
+ };
79
+ groupSize: {
80
+ type: NumberConstructor;
81
+ default: number;
82
+ };
83
+ value: {
84
+ type: StringConstructor;
85
+ default: string;
86
+ };
87
+ showZero: {
88
+ type: BooleanConstructor;
89
+ default: boolean;
90
+ };
91
+ beginPlaceHolder: {
92
+ type: StringConstructor;
93
+ default: string;
94
+ };
95
+ endPlaceHolder: {
96
+ type: StringConstructor;
97
+ default: string;
98
+ };
99
+ separator: {
100
+ type: StringConstructor;
101
+ default: string;
102
+ };
103
+ beginValue: {
104
+ type: StringConstructor;
105
+ default: string;
106
+ };
107
+ endValue: {
108
+ type: StringConstructor;
109
+ default: string;
110
+ };
111
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, "input" | "click" | "blur" | "focus" | "beginValueChange" | "endValueChange" | "valueChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
112
+ id: StringConstructor;
113
+ disabled: {
114
+ type: BooleanConstructor;
115
+ default: boolean;
116
+ };
117
+ readonly: {
118
+ type: BooleanConstructor;
119
+ default: boolean;
120
+ };
121
+ editable: {
122
+ type: BooleanConstructor;
123
+ default: boolean;
124
+ };
125
+ formatter: {
126
+ type: FunctionConstructor;
127
+ };
128
+ parser: {
129
+ type: FunctionConstructor;
130
+ };
131
+ placeholder: {
132
+ type: StringConstructor;
133
+ default: string;
134
+ };
135
+ step: {
136
+ type: NumberConstructor;
137
+ default: number;
138
+ };
139
+ max: {
140
+ type: StringConstructor;
141
+ };
142
+ min: {
143
+ type: StringConstructor;
144
+ };
145
+ bigNumber: {
146
+ type: BooleanConstructor;
147
+ default: boolean;
148
+ };
149
+ showButton: {
150
+ type: BooleanConstructor;
151
+ default: boolean;
152
+ };
153
+ useThousands: {
154
+ type: BooleanConstructor;
155
+ default: boolean;
156
+ };
157
+ textAlign: {
158
+ type: import("vue").PropType<"left" | "right" | "center" | "start" | "end" | "justify">;
159
+ default: string;
160
+ };
161
+ autoDecimal: {
162
+ type: BooleanConstructor;
163
+ default: boolean;
164
+ };
165
+ canNull: {
166
+ type: BooleanConstructor;
167
+ default: boolean;
168
+ };
169
+ precision: {
170
+ type: NumberConstructor;
171
+ default: number;
172
+ };
173
+ prefix: {
174
+ type: StringConstructor;
175
+ default: string;
176
+ };
177
+ suffix: {
178
+ type: StringConstructor;
179
+ default: string;
180
+ };
181
+ decimalSeparator: {
182
+ type: StringConstructor;
183
+ default: string;
184
+ };
185
+ groupSeparator: {
186
+ type: StringConstructor;
187
+ default: string;
188
+ };
189
+ groupSize: {
190
+ type: NumberConstructor;
191
+ default: number;
192
+ };
193
+ value: {
194
+ type: StringConstructor;
195
+ default: string;
196
+ };
197
+ showZero: {
198
+ type: BooleanConstructor;
199
+ default: boolean;
200
+ };
201
+ beginPlaceHolder: {
202
+ type: StringConstructor;
203
+ default: string;
204
+ };
205
+ endPlaceHolder: {
206
+ type: StringConstructor;
207
+ default: string;
208
+ };
209
+ separator: {
210
+ type: StringConstructor;
211
+ default: string;
212
+ };
213
+ beginValue: {
214
+ type: StringConstructor;
215
+ default: string;
216
+ };
217
+ endValue: {
218
+ type: StringConstructor;
219
+ default: string;
220
+ };
221
+ }>>, {
222
+ readonly: boolean;
223
+ disabled: boolean;
224
+ editable: boolean;
225
+ textAlign: "left" | "right" | "center" | "start" | "end" | "justify";
226
+ placeholder: string;
227
+ value: string;
228
+ separator: string;
229
+ step: number;
230
+ bigNumber: boolean;
231
+ showButton: boolean;
232
+ useThousands: boolean;
233
+ autoDecimal: boolean;
234
+ canNull: boolean;
235
+ precision: number;
236
+ prefix: string;
237
+ suffix: string;
238
+ decimalSeparator: string;
239
+ groupSeparator: string;
240
+ groupSize: number;
241
+ showZero: boolean;
242
+ beginPlaceHolder: string;
243
+ endPlaceHolder: string;
244
+ beginValue: string;
245
+ endValue: string;
246
+ }>;
247
+ export default _default;
@@ -0,0 +1,216 @@
1
+ /**
2
+ * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { ExtractPropTypes, PropType } from 'vue';
17
+ type TextAlignType = 'left' | 'right' | 'center' | 'start' | 'end' | 'justify';
18
+ export declare const numberRangeProps: {
19
+ /**
20
+ * 组件标识
21
+ */
22
+ id: StringConstructor;
23
+ /**
24
+ * 是否禁用
25
+ */
26
+ disabled: {
27
+ type: BooleanConstructor;
28
+ default: boolean;
29
+ };
30
+ /**
31
+ * 是否只读
32
+ */
33
+ readonly: {
34
+ type: BooleanConstructor;
35
+ default: boolean;
36
+ };
37
+ /**
38
+ * 是否可编辑
39
+ */
40
+ editable: {
41
+ type: BooleanConstructor;
42
+ default: boolean;
43
+ };
44
+ /**
45
+ * 格式化 formatter 和 parser 必须同时存在
46
+ * formatter: (val: number) => string;
47
+ * parser: (val: string | number) => number;
48
+ */
49
+ formatter: {
50
+ type: FunctionConstructor;
51
+ };
52
+ parser: {
53
+ type: FunctionConstructor;
54
+ };
55
+ /**
56
+ * 空白提示文本
57
+ */
58
+ placeholder: {
59
+ type: StringConstructor;
60
+ default: string;
61
+ };
62
+ /**
63
+ * up or down 步长
64
+ */
65
+ step: {
66
+ type: NumberConstructor;
67
+ default: number;
68
+ };
69
+ /**
70
+ * 最大值
71
+ */
72
+ max: {
73
+ type: StringConstructor;
74
+ };
75
+ /**
76
+ * 最小值
77
+ */
78
+ min: {
79
+ type: StringConstructor;
80
+ };
81
+ /**
82
+ * 启用大数支持
83
+ */
84
+ bigNumber: {
85
+ type: BooleanConstructor;
86
+ default: boolean;
87
+ };
88
+ /**
89
+ * 是否显示加减按钮
90
+ */
91
+ showButton: {
92
+ type: BooleanConstructor;
93
+ default: boolean;
94
+ };
95
+ /**
96
+ * 是否使用千分值
97
+ */
98
+ useThousands: {
99
+ type: BooleanConstructor;
100
+ default: boolean;
101
+ };
102
+ /**
103
+ * 文本方向
104
+ */
105
+ textAlign: {
106
+ type: PropType<TextAlignType>;
107
+ default: string;
108
+ };
109
+ /**
110
+ * 自动补全小数
111
+ */
112
+ autoDecimal: {
113
+ type: BooleanConstructor;
114
+ default: boolean;
115
+ };
116
+ /**
117
+ * 允许为空
118
+ */
119
+ canNull: {
120
+ type: BooleanConstructor;
121
+ default: boolean;
122
+ };
123
+ /**
124
+ * 精度
125
+ */
126
+ precision: {
127
+ type: NumberConstructor;
128
+ default: number;
129
+ };
130
+ /**
131
+ * 前缀
132
+ */
133
+ prefix: {
134
+ type: StringConstructor;
135
+ default: string;
136
+ };
137
+ /**
138
+ * 后缀
139
+ */
140
+ suffix: {
141
+ type: StringConstructor;
142
+ default: string;
143
+ };
144
+ /**
145
+ * 小数点符号
146
+ */
147
+ decimalSeparator: {
148
+ type: StringConstructor;
149
+ default: string;
150
+ };
151
+ /**
152
+ * 千分位符号
153
+ */
154
+ groupSeparator: {
155
+ type: StringConstructor;
156
+ default: string;
157
+ };
158
+ /**
159
+ * 使用千分位时,每组显示的字符数
160
+ */
161
+ groupSize: {
162
+ type: NumberConstructor;
163
+ default: number;
164
+ };
165
+ /**
166
+ * 值
167
+ */
168
+ value: {
169
+ type: StringConstructor;
170
+ default: string;
171
+ };
172
+ /**
173
+ * 显示0值
174
+ */
175
+ showZero: {
176
+ type: BooleanConstructor;
177
+ default: boolean;
178
+ };
179
+ /**
180
+ * 下限placeholder
181
+ */
182
+ beginPlaceHolder: {
183
+ type: StringConstructor;
184
+ default: string;
185
+ };
186
+ /**
187
+ * 上限placeholder
188
+ */
189
+ endPlaceHolder: {
190
+ type: StringConstructor;
191
+ default: string;
192
+ };
193
+ /**
194
+ * 间隔符
195
+ */
196
+ separator: {
197
+ type: StringConstructor;
198
+ default: string;
199
+ };
200
+ /**
201
+ * 下限值
202
+ */
203
+ beginValue: {
204
+ type: StringConstructor;
205
+ default: string;
206
+ };
207
+ /**
208
+ * 上限值
209
+ */
210
+ endValue: {
211
+ type: StringConstructor;
212
+ default: string;
213
+ };
214
+ };
215
+ export type NumberRangeProps = ExtractPropTypes<typeof numberRangeProps>;
216
+ export {};
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { App } from 'vue';
17
+ import FNumberSpinner from './src/number-spinner.component';
18
+ export * from './src/number-spinner.props';
19
+ export { FNumberSpinner };
20
+ declare const _default: {
21
+ install(app: App): void;
22
+ };
23
+ export default _default;
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { BigNumber } from 'bignumber.js';
17
+ export interface UseData {
18
+ onModelChange: (realVal: any, updateOn: string) => void;
19
+ up: (e: Event) => void;
20
+ down: (e: Event) => void;
21
+ onFocusTextBox: ($event: Event) => void;
22
+ onBlurTextBox: ($event: Event) => void;
23
+ onInput: ($event: Event, updateOn: string) => void;
24
+ onKeyDown: ($event: KeyboardEvent) => void;
25
+ }
26
+ export interface NumberFormatter {
27
+ /** 前置符号 */
28
+ prefix?: string;
29
+ /** 后缀 */
30
+ suffix?: string;
31
+ /** 小数点 */
32
+ decimalSeparator?: string;
33
+ /** 千分位符号 */
34
+ groupSeparator?: string;
35
+ /** 千分位分组 */
36
+ groupSize?: number;
37
+ }
38
+ export interface UseUtil {
39
+ isEmpty: (value: any) => boolean;
40
+ setDisabledState: (isDisabled: boolean) => void;
41
+ cleanNumString: (value: any) => string;
42
+ getPrecision: () => number;
43
+ toFixed: (value: BigNumber | number) => string;
44
+ _getRealValue: (value: BigNumber) => string | number;
45
+ getRealValue: (value: any) => string | number;
46
+ isDisableOfBtn: (type: string, value?: any) => boolean;
47
+ buildFormatOptions: () => object;
48
+ _modelChanged: (realVal: any) => void;
49
+ validInterval: (bn: BigNumber) => BigNumber;
50
+ format: (value: any) => string;
51
+ _toFormat: (_bgNum: BigNumber, fmt: NumberFormatter) => string;
52
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { UseData } from './types';
17
+ import { NumberSpinnerProps } from '../number-spinner.props';
18
+ import { SetupContext, Ref } from 'vue';
19
+ export declare function UseData(props: NumberSpinnerProps, context: SetupContext, realValue: Ref<number | string | null>, inputValue: Ref, isFocus: Ref<boolean>, formatOptions: Ref): UseData;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { UseUtil } from './types';
17
+ import { NumberSpinnerProps } from '../number-spinner.props';
18
+ import { SetupContext, Ref } from 'vue';
19
+ export declare function UseUtil(props: NumberSpinnerProps, context: SetupContext, realValue: Ref<number | string | null>, formatOptions: Ref): UseUtil;