Skip to content

Commit

Permalink
refactor(input-number): move to setup script (#2964)
Browse files Browse the repository at this point in the history
  • Loading branch information
eiinu authored Mar 13, 2024
1 parent e807dba commit 2933216
Show file tree
Hide file tree
Showing 25 changed files with 394 additions and 397 deletions.
1 change: 1 addition & 0 deletions src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,7 @@
"cName": "数字输入框",
"type": "component",
"show": true,
"setup": true,
"desc": "数字输入框组件",
"author": "szg2008"
},
Expand Down
2 changes: 1 addition & 1 deletion src/packages/__VUE/animate/doc.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ app.use(Animate);
| 10 | twinkle | twinkle,It is recommended that loop be true |
| 11 | flicker | Polish button,It is recommended that loop be true |

### Types 4.3.2
### Types v4.3.2

The component exports the following type definitions:

Expand Down
2 changes: 1 addition & 1 deletion src/packages/__VUE/animate/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ app.use(Animate);
| 10 | twinkle | 水波,建议 loop 为 true |
| 11 | flicker | 擦亮按钮,建议 loop 为 true |

### 类型定义 4.3.2
### 类型定义 v4.3.2

组件导出以下类型定义:

Expand Down
2 changes: 1 addition & 1 deletion src/packages/__VUE/animate/doc.taro.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ app.use(Animate);
| 10 | twinkle | 水波,建议 loop 为 true |
| 11 | flicker | 擦亮按钮,建议 loop 为 true |

### 类型定义 4.3.2
### 类型定义 v4.3.2

组件导出以下类型定义:

Expand Down
2 changes: 1 addition & 1 deletion src/packages/__VUE/ecard/index.taro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<script lang="ts">
import { Ref, ref, watch } from 'vue';
import { createComponent } from '@/packages/utils/create';
import NutInputNumber from '../inputnumber/index.taro.vue';
import NutInputNumber from '../inputnumber/index.taro';
import type { PropType } from 'vue';
import { useLocale } from '@/packages/utils/useLocale';
Expand Down
2 changes: 1 addition & 1 deletion src/packages/__VUE/ecard/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<script lang="ts">
import { Ref, ref, watch } from 'vue';
import { createComponent } from '@/packages/utils/create';
import NutInputNumber from '../inputnumber/index.vue';
import NutInputNumber from '../inputnumber';
import type { PropType } from 'vue';
import { useLocale } from '@/packages/utils/useLocale';
Expand Down
2 changes: 1 addition & 1 deletion src/packages/__VUE/form/__tests__/index.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Button from '../../button';
import Switch from '../../switch/index.vue';
import Checkbox from '../../checkbox/index.vue';
import Rate from '../../rate/index.vue';
import InputNumber from '../../inputnumber/index.vue';
import InputNumber from '../../inputnumber';
import Range from '../../range/index.vue';
import Uploader from '../../uploader/index.vue';

Expand Down
2 changes: 1 addition & 1 deletion src/packages/__VUE/inputnumber/__tests__/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { mount } from '@vue/test-utils';
import InputNumber from '../index.vue';
import InputNumber from '../';
import { h, nextTick } from 'vue';
import { Left, Right } from '@nutui/icons-vue';

Expand Down
11 changes: 11 additions & 0 deletions src/packages/__VUE/inputnumber/doc.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,17 @@ Set step size `step` 0.1 `decimal places` keep 1 decimal place
| blur | Triggered when the input box blur | `event: Event` |
| focus | Triggered when the input box focus | `event: Event ` |

### Types version

The component exports the following type definitions:

```js
import type {
InputNumberProps,
InputNumberInstance
} from '@nutui/nutui';
```

## Theming

### CSS Variables
Expand Down
11 changes: 11 additions & 0 deletions src/packages/__VUE/inputnumber/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,17 @@ app.use(InputNumber);
| blur | 输入框失去焦点时触发 | `(event: Event) ` |
| focus | 输入框获得焦点时触发 | `(event: Event ) ` |

### 类型定义 version

组件导出以下类型定义:

```js
import type {
InputNumberProps,
InputNumberInstance
} from '@nutui/nutui';
```

## 主题定制

### 样式变量
Expand Down
11 changes: 11 additions & 0 deletions src/packages/__VUE/inputnumber/doc.taro.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,17 @@ app.use(InputNumber);
| blur | 输入框失去焦点时触发 | `(event: Event) ` |
| focus | 输入框获得焦点时触发 | `(event: Event ) ` |

### 类型定义 version

组件导出以下类型定义:

```js
import type {
InputNumberProps,
InputNumberInstance
} from '@nutui/nutui-taro';
```

## 主题定制

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

withInstall(InputNumber);

export type { InputNumberProps } from './input-number.taro.vue';

export type InputNumberInstance = ComponentPublicInstance & InstanceType<typeof InputNumber>;

export { InputNumber, InputNumber as default };
195 changes: 0 additions & 195 deletions src/packages/__VUE/inputnumber/index.taro.vue

This file was deleted.

11 changes: 11 additions & 0 deletions src/packages/__VUE/inputnumber/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import InputNumber from './input-number.vue';
import type { ComponentPublicInstance } from 'vue';
import { withInstall } from '@/packages/utils';

withInstall(InputNumber);

export type { InputNumberProps } from './input-number.vue';

export type InputNumberInstance = ComponentPublicInstance & InstanceType<typeof InputNumber>;

export { InputNumber, InputNumber as default };
Loading

0 comments on commit 2933216

Please sign in to comment.