Skip to content

Commit

Permalink
refactor(input): move to script setup (#3001)
Browse files Browse the repository at this point in the history
  • Loading branch information
eiinu authored May 7, 2024
1 parent 795c835 commit 328e3af
Show file tree
Hide file tree
Showing 14 changed files with 641 additions and 695 deletions.
1 change: 1 addition & 0 deletions src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@
"name": "Input",
"cName": "输入框",
"desc": "输入框组件",
"setup": true,
"author": "gxx158"
},
{
Expand Down
15 changes: 15 additions & 0 deletions src/packages/__VUE/input/doc.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,21 @@ After setting the `maxlength` and `show-word-limit` attributes, word count will
| blur `4.0.6` | Blur |
| select `4.0.6` | Selct |

### Types version

The component exports the following type definitions:

```ts
import type {
InputType,
InputAlign,
InputConfirmType,
InputFormatTrigger,
InputProps,
InputInstance
} from '@nutui/nutui'
```

## Theming

### CSS Variables
Expand Down
15 changes: 15 additions & 0 deletions src/packages/__VUE/input/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,21 @@ app.use(Input)
| blur `4.0.6` | 失去焦点 |
| select `4.0.6` | 选择文字 |

### 类型定义 version

组件导出以下类型定义:

```ts
import type {
InputType,
InputAlign,
InputConfirmType,
InputFormatTrigger,
InputProps,
InputInstance
} from '@nutui/nutui'
```

## 主题定制

### 样式变量
Expand Down
15 changes: 15 additions & 0 deletions src/packages/__VUE/input/doc.taro.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,21 @@ app.use(Input)
| left `4.0.1` | 自定义输入框左侧插槽内容 |
| right `4.0.1` | 自定义输入框右侧插槽内容 |

### 类型定义 version

组件导出以下类型定义:

```ts
import type {
InputType,
InputAlign,
InputConfirmType,
InputFormatTrigger,
InputProps,
InputInstance
} from '@nutui/nutui-taro'
```

## 主题定制

### 样式变量
Expand Down
13 changes: 13 additions & 0 deletions src/packages/__VUE/input/index.taro.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import Input from './input.taro.vue'
import type { ComponentPublicInstance } from 'vue'
import { withInstall } from '@/packages/utils'

withInstall(Input)

export type { InputProps } from './input.taro.vue'

export type { InputType, InputAlign, InputConfirmType, InputFormatTrigger } from './types'

export type InputInstance = ComponentPublicInstance & InstanceType<typeof Input>

export { Input, Input as default }
Loading

0 comments on commit 328e3af

Please sign in to comment.