Skip to content

Commit a583df6

Browse files
committed
chore: upgrade dumi v4
1 parent 0f8765e commit a583df6

27 files changed

+315
-53
lines changed

.dumirc.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { defineConfig } from 'dumi';
2+
3+
export default defineConfig({
4+
favicons: [
5+
'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4',
6+
],
7+
themeConfig: {
8+
name: 'InputNumber',
9+
logo: 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4'
10+
},
11+
outputPath: '.doc',
12+
exportStatic: {},
13+
styles: [`body .dumi-default-header-left { width: 230px; } body .dumi-default-hero-title { font-size: 100px; }`],
14+
});

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,8 @@ package-lock.json
3535
.umi-production
3636
.umi-test
3737
.env.local
38+
39+
# dumi
40+
.dumi/tmp
41+
.dumi/tmp-production
42+

.umirc.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

docs/api.md

Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
---
2+
title: API
3+
nav:
4+
order: 10
5+
title: API
6+
path: /api
7+
---
8+
9+
<table class="table table-bordered table-striped">
10+
<thead>
11+
<tr>
12+
<th style="width: 100px;">name</th>
13+
<th style="width: 50px;">type</th>
14+
<th style="width: 50px;">default</th>
15+
<th>description</th>
16+
</tr>
17+
</thead>
18+
<tbody>
19+
<tr>
20+
<td>prefixCls</td>
21+
<td>string</td>
22+
<td>rc-input-number</td>
23+
<td>Specifies the class prefix</td>
24+
</tr>
25+
<tr>
26+
<td>min</td>
27+
<td>Number</td>
28+
<td></td>
29+
<td>Specifies the minimum value</td>
30+
</tr>
31+
<tr>
32+
<td>onClick</td>
33+
<td></td>
34+
<td></td>
35+
<td></td>
36+
</tr>
37+
<tr>
38+
<td>placeholder</td>
39+
<td>string</td>
40+
<td></td>
41+
<td></td>
42+
</tr>
43+
<tr>
44+
<td>max</td>
45+
<td>Number</td>
46+
<td></td>
47+
<td>Specifies the maximum value</td>
48+
</tr>
49+
<tr>
50+
<td>step</td>
51+
<td>Number or String</td>
52+
<td>1</td>
53+
<td>Specifies the legal number intervals</td>
54+
</tr>
55+
<tr>
56+
<td>precision</td>
57+
<td>Number</td>
58+
<td></td>
59+
<td>Specifies the precision length of value</td>
60+
</tr>
61+
<tr>
62+
<td>disabled</td>
63+
<td>Boolean</td>
64+
<td>false</td>
65+
<td>Specifies that an InputNumber should be disabled</td>
66+
</tr>
67+
<tr>
68+
<td>focusOnUpDown</td>
69+
<td>Boolean</td>
70+
<td>true</td>
71+
<td>whether focus input when click up or down button</td>
72+
</tr>
73+
<tr>
74+
<td>required</td>
75+
<td>Boolean</td>
76+
<td>false</td>
77+
<td>Specifies that an InputNumber is required</td>
78+
</tr>
79+
<tr>
80+
<td>autoFocus</td>
81+
<td>Boolean</td>
82+
<td>false</td>
83+
<td>Specifies that an InputNumber should automatically get focus when the page loads</td>
84+
</tr>
85+
<tr>
86+
<td>readOnly</td>
87+
<td>Boolean</td>
88+
<td>false</td>
89+
<td>Specifies that an InputNumber is read only </td>
90+
</tr>
91+
<tr>
92+
<td>controls</td>
93+
<td>Boolean</td>
94+
<td>true</td>
95+
<td>Whether to enable the control buttons</td>
96+
</tr>
97+
<tr>
98+
<td>name</td>
99+
<td>String</td>
100+
<td></td>
101+
<td>Specifies the name of an InputNumber</td>
102+
</tr>
103+
<tr>
104+
<td>id</td>
105+
<td>String</td>
106+
<td></td>
107+
<td>Specifies the id of an InputNumber</td>
108+
</tr>
109+
<tr>
110+
<td>value</td>
111+
<td>Number</td>
112+
<td></td>
113+
<td>Specifies the value of an InputNumber</td>
114+
</tr>
115+
<tr>
116+
<td>defaultValue</td>
117+
<td>Number</td>
118+
<td></td>
119+
<td>Specifies the defaultValue of an InputNumber</td>
120+
</tr>
121+
<tr>
122+
<td>onChange</td>
123+
<td>Function</td>
124+
<td></td>
125+
<td>Called when value of an InputNumber changed</td>
126+
</tr>
127+
<tr>
128+
<td>onBlur</td>
129+
<td>Function</td>
130+
<td></td>
131+
<td>Called when user leaves an input field</td>
132+
</tr>
133+
<tr>
134+
<td>onPressEnter</td>
135+
<td>Function</td>
136+
<td></td>
137+
<td>The callback function that is triggered when Enter key is pressed.</td>
138+
</tr>
139+
<tr>
140+
<td>onFocus</td>
141+
<td>Function</td>
142+
<td></td>
143+
<td>Called when an element gets focus</td>
144+
</tr>
145+
<tr>
146+
<td>style</td>
147+
<td>Object</td>
148+
<td></td>
149+
<td>root style. such as {width:100}</td>
150+
</tr>
151+
<tr>
152+
<td>upHandler</td>
153+
<td>React.Node</td>
154+
<td></td>
155+
<td>custom the up step element</td>
156+
</tr>
157+
<tr>
158+
<td>downHandler</td>
159+
<td>React.Node</td>
160+
<td></td>
161+
<td>custom the down step element</td>
162+
</tr>
163+
<tr>
164+
<td>formatter</td>
165+
<td>(value: number|string): displayValue: string</td>
166+
<td></td>
167+
<td>Specifies the format of the value presented</td>
168+
</tr>
169+
<tr>
170+
<td>parser</td>
171+
<td>(displayValue: string) => value: number</td>
172+
<td>`input => input.replace(/[^\w\.-]*/g, '')`</td>
173+
<td>Specifies the value extracted from formatter</td>
174+
</tr>
175+
<tr>
176+
<td>pattern</td>
177+
<td>string</td>
178+
<td></td>
179+
<td>Specifies a regex pattern to be added to the input number element - useful for forcing iOS to open the number pad instead of the normal keyboard (supply a regex of "\d*" to do this) or form validation</td>
180+
</tr>
181+
<tr>
182+
<td>decimalSeparator</td>
183+
<td>string</td>
184+
<td></td>
185+
<td>Specifies the decimal separator</td>
186+
</tr>
187+
<tr>
188+
<td>inputMode</td>
189+
<td>string</td>
190+
<td></td>
191+
<td>Specifies the inputmode of input</td>
192+
</tr>
193+
</tbody>
194+
</table>

docs/demo/combination-key-format.md

Lines changed: 0 additions & 3 deletions
This file was deleted.
File renamed without changes.

docs/demo/custom.md

Lines changed: 0 additions & 3 deletions
This file was deleted.
File renamed without changes.

docs/demo/debug.md

Lines changed: 0 additions & 3 deletions
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)