Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .dumirc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { defineConfig } from 'dumi';

export default defineConfig({
favicons: [
'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4',
],
themeConfig: {
name: 'InputNumber',
logo: 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4'
},
outputPath: '.doc',
exportStatic: {},
styles: [`body .dumi-default-header-left { width: 230px; } body .dumi-default-hero-title { font-size: 100px; }`],
});
10 changes: 0 additions & 10 deletions .fatherrc.js

This file was deleted.

5 changes: 5 additions & 0 deletions .fatherrc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { defineConfig } from 'father';

export default defineConfig({
plugins: ['@rc-component/father-plugin'],
});
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ lib
es
coverage
yarn.lock
pnpm-lock.yaml
package-lock.json
.doc/

Expand All @@ -34,3 +35,8 @@ package-lock.json
.umi-production
.umi-test
.env.local

# dumi
.dumi/tmp
.dumi/tmp-production

19 changes: 0 additions & 19 deletions .umirc.ts

This file was deleted.

194 changes: 194 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
---
title: API
nav:
order: 10
title: API
path: /api
---

<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width: 100px;">name</th>
<th style="width: 50px;">type</th>
<th style="width: 50px;">default</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>prefixCls</td>
<td>string</td>
<td>rc-input-number</td>
<td>Specifies the class prefix</td>
</tr>
<tr>
<td>min</td>
<td>Number</td>
<td></td>
<td>Specifies the minimum value</td>
</tr>
<tr>
<td>onClick</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>placeholder</td>
<td>string</td>
<td></td>
<td></td>
</tr>
<tr>
<td>max</td>
<td>Number</td>
<td></td>
<td>Specifies the maximum value</td>
</tr>
<tr>
<td>step</td>
<td>Number or String</td>
<td>1</td>
<td>Specifies the legal number intervals</td>
</tr>
<tr>
<td>precision</td>
<td>Number</td>
<td></td>
<td>Specifies the precision length of value</td>
</tr>
<tr>
<td>disabled</td>
<td>Boolean</td>
<td>false</td>
<td>Specifies that an InputNumber should be disabled</td>
</tr>
<tr>
<td>focusOnUpDown</td>
<td>Boolean</td>
<td>true</td>
<td>whether focus input when click up or down button</td>
</tr>
<tr>
<td>required</td>
<td>Boolean</td>
<td>false</td>
<td>Specifies that an InputNumber is required</td>
</tr>
<tr>
<td>autoFocus</td>
<td>Boolean</td>
<td>false</td>
<td>Specifies that an InputNumber should automatically get focus when the page loads</td>
</tr>
<tr>
<td>readOnly</td>
<td>Boolean</td>
<td>false</td>
<td>Specifies that an InputNumber is read only </td>
</tr>
<tr>
<td>controls</td>
<td>Boolean</td>
<td>true</td>
<td>Whether to enable the control buttons</td>
</tr>
<tr>
<td>name</td>
<td>String</td>
<td></td>
<td>Specifies the name of an InputNumber</td>
</tr>
<tr>
<td>id</td>
<td>String</td>
<td></td>
<td>Specifies the id of an InputNumber</td>
</tr>
<tr>
<td>value</td>
<td>Number</td>
<td></td>
<td>Specifies the value of an InputNumber</td>
</tr>
<tr>
<td>defaultValue</td>
<td>Number</td>
<td></td>
<td>Specifies the defaultValue of an InputNumber</td>
</tr>
<tr>
<td>onChange</td>
<td>Function</td>
<td></td>
<td>Called when value of an InputNumber changed</td>
</tr>
<tr>
<td>onBlur</td>
<td>Function</td>
<td></td>
<td>Called when user leaves an input field</td>
</tr>
<tr>
<td>onPressEnter</td>
<td>Function</td>
<td></td>
<td>The callback function that is triggered when Enter key is pressed.</td>
</tr>
<tr>
<td>onFocus</td>
<td>Function</td>
<td></td>
<td>Called when an element gets focus</td>
</tr>
<tr>
<td>style</td>
<td>Object</td>
<td></td>
<td>root style. such as {width:100}</td>
</tr>
<tr>
<td>upHandler</td>
<td>React.Node</td>
<td></td>
<td>custom the up step element</td>
</tr>
<tr>
<td>downHandler</td>
<td>React.Node</td>
<td></td>
<td>custom the down step element</td>
</tr>
<tr>
<td>formatter</td>
<td>(value: number|string): displayValue: string</td>
<td></td>
<td>Specifies the format of the value presented</td>
</tr>
<tr>
<td>parser</td>
<td>(displayValue: string) => value: number</td>
<td>`input => input.replace(/[^\w\.-]*/g, '')`</td>
<td>Specifies the value extracted from formatter</td>
</tr>
<tr>
<td>pattern</td>
<td>string</td>
<td></td>
<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>
</tr>
<tr>
<td>decimalSeparator</td>
<td>string</td>
<td></td>
<td>Specifies the decimal separator</td>
</tr>
<tr>
<td>inputMode</td>
<td>string</td>
<td></td>
<td>Specifies the inputmode of input</td>
</tr>
</tbody>
</table>
3 changes: 0 additions & 3 deletions docs/demo/combination-key-format.md

This file was deleted.

3 changes: 0 additions & 3 deletions docs/demo/custom.md

This file was deleted.

File renamed without changes.
3 changes: 0 additions & 3 deletions docs/demo/debug.md

This file was deleted.

File renamed without changes.
3 changes: 0 additions & 3 deletions docs/demo/decimal.md

This file was deleted.

File renamed without changes.
3 changes: 0 additions & 3 deletions docs/demo/formatter.md

This file was deleted.

File renamed without changes.
3 changes: 0 additions & 3 deletions docs/demo/input-control.md

This file was deleted.

File renamed without changes.
3 changes: 0 additions & 3 deletions docs/demo/precision.md

This file was deleted.

File renamed without changes.
3 changes: 0 additions & 3 deletions docs/demo/simple-use-touch.md

This file was deleted.

File renamed without changes.
3 changes: 0 additions & 3 deletions docs/demo/simple.md

This file was deleted.

File renamed without changes.
3 changes: 0 additions & 3 deletions docs/demo/small-step.md

This file was deleted.

File renamed without changes.
48 changes: 48 additions & 0 deletions docs/example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: Example
nav:
title: Example
path: /example
---

## simple

<code src="./demo/simple.tsx"></code>

## combination-key-format

<code src="./demo/combination-key-format.tsx"></code>

## custom

<code src="./demo/custom.tsx"></code>

## debug

<code src="./demo/debug.tsx"></code>

## decimal

<code src="./demo/decimal.tsx"></code>

## formatter

<code src="./demo/formatter.tsx"></code>

## input-control

<code src="./demo/input-control.tsx"></code>

## precision

<code src="./demo/precision.tsx"></code>

## simple-use-touch

<code src="./demo/simple-use-touch.tsx"></code>

## small-step

<code src="./demo/small-step.tsx"></code>


Loading