antd-number-picker
所属分类:硬件设计
开发工具:TypeScript
文件大小:0KB
下载次数:0
上传日期:2023-09-25 18:45:50
上 传 者:
sh-1993
说明: 蚂蚁设计编号选择器,
(Ant design number picker,)
文件列表:
.babelrc.json (240, 2023-11-08)
.commitlintrc.json (118, 2023-11-08)
.editorconfig (146, 2023-11-08)
.env.template (0, 2023-11-08)
.eslintrc.js (1898, 2023-11-08)
.husky/ (0, 2023-11-08)
.husky/commit-msg (98, 2023-11-08)
.husky/common.sh (169, 2023-11-08)
.husky/pre-commit (89, 2023-11-08)
.lintstagedrc.json (121, 2023-11-08)
.prettierignore (124, 2023-11-08)
.prettierrc.json (68, 2023-11-08)
.release-it.json (146, 2023-11-08)
.storybook/ (0, 2023-11-08)
.storybook/main.ts (875, 2023-11-08)
.storybook/preview.ts (284, 2023-11-08)
.yarn/ (0, 2023-11-08)
.yarn/releases/ (0, 2023-11-08)
.yarn/releases/yarn-3.6.4.cjs (2231402, 2023-11-08)
.yarnrc.yml (66, 2023-11-08)
LICENSE (35149, 2023-11-08)
package.json (3799, 2023-11-08)
renovate.json (325, 2023-11-08)
src/ (0, 2023-11-08)
src/AntdNumberPicker.tsx (8131, 2023-11-08)
src/index.ts (36, 2023-11-08)
src/stories/ (0, 2023-11-08)
src/stories/AntdNumberPicker.stories.tsx (1259, 2023-11-08)
tests/ (0, 2023-11-08)
tests/setup.js (220, 2023-11-08)
tsconfig.json (205, 2023-11-08)
tsup.config.ts (276, 2023-11-08)
vitest.config.js (270, 2023-11-08)
yarn.lock (735816, 2023-11-08)
... ...
# @culur/antd-number-picker
> Ant design number picker.
[![Npm version](https://img.shields.io/npm/v/@culur/antd-number-picker.svg)](https://www.npmjs.com/package/@culur/antd-number-picker)
[![Downloads/month](https://img.shields.io/npm/dm/@culur/antd-number-picker.svg)](http://www.npmtrends.com/@culur/antd-number-picker)
[![GitHub issues](https://img.shields.io/github/issues/culur/antd-number-picker)](https://github.com/culur/antd-number-picker/issues)
[![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com/)
[![Main](https://github.com/culur/antd-number-picker/actions/workflows/main.yml/badge.svg)](https://github.com/culur/antd-number-picker/actions/workflows/main.yml)
[![Publish](https://github.com/culur/antd-number-picker/actions/workflows/publish.yml/badge.svg)](https://github.com/culur/antd-number-picker/actions/workflows/publish.yml)
[![CodeFactor](https://www.codefactor.io/repository/github/culur/antd-number-picker/badge)](https://www.codefactor.io/repository/github/culur/antd-number-picker)
## Install
Add `@culur/antd-number-picker` dependency to your project.
```bash
# Using npm
npm install @culur/antd-number-picker
# Using yarn
yarn add @culur/antd-number-picker
```
## Usage
### Standalone
```tsx
function Example() {
const [value, setValue] = setState(0);
return (
setValue(value_)}
/>
);
}
```
### Antd form
```tsx
function Example() {
type FormValues = { number: number };
const [form] = Form.useForm();
const onFinish = (values: FormValues) => {
console.log(`form values: ${values.number}`);
};
return (
);
}
```
## Props
| Property | Description | Type | Default | Required |
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ | ---------- | -------- |
| className | InputNumber className | `string` | - | - |
| min | The min value | `number` | - | true |
| max | The max value | `number` | - | true |
| readOnly | If readonly the input | `boolean` | false | - |
| placement | The position of the tooltip relative to the target, which can be one of `top` `left` `right` `bottom` `topLeft` `topRight` `bottomLeft` `bottomRight` `leftTop` `leftBottom` `rightTop` `rightBottom` | `string` | bottomLeft | - |
| trigger | Tooltip trigger mode. Could be multiple by passing an array | `hover` \| `focus` \| `click` \| `contextMenu` \| `string[]` | click | - |
| cols | Number of cols in popover | `number` | 7 | - |
| rows | Number of rows in popover | `number` | 7 | - |
| value | The current value | `number` | - | - |
| onChange | The callback triggered when the value is changed | `function(value: number \| string \| null)` | - | - |
## License
`@culur/antd-number-picker` is released under the GNU GPLv3 license.
近期下载者:
相关文件:
收藏者: