Skip to content

Commit

Permalink
refactor(switch): move to script setup (jd-opensource#2992)
Browse files Browse the repository at this point in the history
  • Loading branch information
eiinu authored Mar 25, 2024
1 parent 9459792 commit ff87bf9
Show file tree
Hide file tree
Showing 10 changed files with 235 additions and 238 deletions.
1 change: 1 addition & 0 deletions src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@
"name": "Switch",
"cName": "开关",
"desc": "用来打开或关闭选项",
"setup": true,
"author": "zongyue3"
},
{
Expand Down
8 changes: 8 additions & 0 deletions src/packages/__VUE/switch/doc.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ app.use(Switch)
| --- | --- | --- |
| change | Emitted when check status changed | (value: boolean,event: Event) |

### Types version

The component exports the following type definitions:

```ts
import type { SwitchProps, SwitchInstance } from '@nutui/nutui'
```

## Theming

### CSS Variables
Expand Down
8 changes: 8 additions & 0 deletions src/packages/__VUE/switch/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ app.use(Switch)
| --- | --- | --- |
| change | 切换开关时触发 | (value: boolean,event: Event) |

### 类型定义 version

组件导出以下类型定义:

```ts
import type { SwitchProps, SwitchInstance } from '@nutui/nutui'
```

## 主题定制

### 样式变量
Expand Down
8 changes: 8 additions & 0 deletions src/packages/__VUE/switch/doc.taro.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ app.use(Switch)
| --- | --- | --- |
| change | 切换开关时触发 | (value: boolean,event: Event) |

### 类型定义 version

组件导出以下类型定义:

```ts
import type { SwitchProps, SwitchInstance } from '@nutui/nutui-taro'
```

## 主题定制

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

withInstall(Switch);

export type { SwitchProps } from './switch.taro.vue';

export type SwitchInstance = ComponentPublicInstance & InstanceType<typeof Switch>;

export { Switch, Switch as default };
119 changes: 0 additions & 119 deletions src/packages/__VUE/switch/index.taro.vue

This file was deleted.

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

withInstall(Switch);

export type { SwitchProps } from './switch.vue';

export type SwitchInstance = ComponentPublicInstance & InstanceType<typeof Switch>;

export { Switch, Switch as default };
119 changes: 0 additions & 119 deletions src/packages/__VUE/switch/index.vue

This file was deleted.

Loading

0 comments on commit ff87bf9

Please sign in to comment.