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
10 changes: 5 additions & 5 deletions packages/components/switch/README.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ name | type | default | description | required
-- | -- | -- | -- | --
style | Object | - | CSS(Cascading Style Sheets) | N
custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N
custom-value | Array | [true, false] | Typescript`Array<SwitchValue>` | N
custom-value | Array | [true, false] | Typescript: `Array<SwitchValue>` | N
disabled | Boolean | undefined | \- | N
icon | Array | [] | `0.27.0`。Typescript`string[]` | N
label | Array | [] | `0.27.0`。Typescript`string[]` | N
icon | Array | [] | `0.27.0`。Typescript: `string[]` | N
label | Array | [] | `0.27.0`。Typescript: `string[]` | N
loading | Boolean | false | `0.27.0` | N
size | String | medium | `0.27.0`。options: small/medium/large | N
value | String / Number / Boolean | null | Typescript`SwitchValue` `type SwitchValue = string \| number \| boolean`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/switch/type.ts) | N
default-value | String / Number / Boolean | undefined | uncontrolled property。Typescript`SwitchValue` `type SwitchValue = string \| number \| boolean`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/switch/type.ts) | N
value | String / Number / Boolean | null | Typescript: `SwitchValue` `type SwitchValue = string \| number \| boolean`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/switch/type.ts) | N
default-value | String / Number / Boolean | undefined | uncontrolled property。Typescript: `SwitchValue` `type SwitchValue = string \| number \| boolean`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/switch/type.ts) | N

### Switch Events

Expand Down
2 changes: 1 addition & 1 deletion packages/components/switch/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
* */

export interface TdSwitchProps<T = SwitchValue> {
export interface TdSwitchProps {
/**
* 用于自定义开关的值,[打开时的值,关闭时的值]。默认为 [true, false]。示例:[1, 0]、['open', 'close']
* @default [true, false]
Expand Down
2 changes: 1 addition & 1 deletion packages/tdesign-uniapp-chat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

扫码查看 ↓

<img src="https://tdesign.gtimg.com/uniapp/example-qrcode.png" width="600" />
<img src="https://tdesign.gtimg.com/uniapp/example-qrcode.png" width="700" />

> 其他平台同样支持,仅因平台审核等原因未能上架预览,不影响组件库正常使用。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spline: explain

Scan the QR code to preview ↓

<img src="https://tdesign.gtimg.com/uniapp/example-qrcode.png" width="600" />
<img src="https://tdesign.gtimg.com/uniapp/example-qrcode.png" width="700" />

> Other platforms are also supported. Due to platform review and other reasons, previews may not be available, but this does not affect the normal use of the component library.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spline: explain

扫码查看 ↓

<img src="https://tdesign.gtimg.com/uniapp/example-qrcode.png" width="600" />
<img src="https://tdesign.gtimg.com/uniapp/example-qrcode.png" width="700" />

> 其他平台同样支持,仅因平台审核等原因未能上架预览,不影响组件库正常使用。

Expand Down
6 changes: 6 additions & 0 deletions packages/tdesign-uniapp/.changelog/pr-4553.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
pr_number: 4553
contributor: novlan1
---

- fix(Switch): 修复 `TdSwitchProps` 泛型参数导致 TypeScript 类型报错的问题 @novlan1 ([#4553](https://github.com/Tencent/tdesign-miniprogram/pull/4553))
2 changes: 1 addition & 1 deletion packages/tdesign-uniapp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

扫码查看 ↓

<img src="https://tdesign.gtimg.com/uniapp/example-qrcode.png" width="600" />
<img src="https://tdesign.gtimg.com/uniapp/example-qrcode.png" width="700" />

> 其他平台同样支持,仅因平台审核等原因未能上架预览,不影响组件库正常使用。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spline: explain

Scan the QR code to preview ↓

<img src="https://tdesign.gtimg.com/uniapp/example-qrcode.png" width="600" />
<img src="https://tdesign.gtimg.com/uniapp/example-qrcode.png" width="700" />

> Other platforms are also supported. Due to platform review and other reasons, previews may not be available, but this does not affect the normal use of the component library.

Expand Down
2 changes: 1 addition & 1 deletion packages/tdesign-uniapp/site/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spline: explain

扫码查看 ↓

<img src="https://tdesign.gtimg.com/uniapp/example-qrcode.png" width="600" />
<img src="https://tdesign.gtimg.com/uniapp/example-qrcode.png" width="700" />

> 其他平台同样支持,仅因平台审核等原因未能上架预览,不影响组件库正常使用。

Expand Down
10 changes: 5 additions & 5 deletions packages/uniapp-components/switch/README.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
name | type | default | description | required
-- | -- | -- | -- | --
custom-style | Object | - | CSS(Cascading Style Sheets) | N
custom-value | Array | [true, false] | Typescript`Array<SwitchValue>` | N
custom-value | Array | [true, false] | Typescript: `Array<SwitchValue>` | N
disabled | Boolean | undefined | \- | N
icon | Array | [] | Typescript`string[]` | N
label | Array | [] | Typescript`string[]` | N
icon | Array | [] | Typescript: `string[]` | N
label | Array | [] | Typescript: `string[]` | N
loading | Boolean | false | \- | N
size | String | medium | options: small/medium/large | N
value | String / Number / Boolean | - | `v-model:value` is supported。Typescript`SwitchValue` `type SwitchValue = string \| number \| boolean`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/switch/type.ts) | N
default-value | String / Number / Boolean | - | uncontrolled property。Typescript`SwitchValue` `type SwitchValue = string \| number \| boolean`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/switch/type.ts) | N
value | String / Number / Boolean | - | `v-model:value` is supported。Typescript: `SwitchValue` `type SwitchValue = string \| number \| boolean`。[see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/switch/type.ts) | N
default-value | String / Number / Boolean | - | uncontrolled property。Typescript: `SwitchValue` `type SwitchValue = string \| number \| boolean`。[see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/switch/type.ts) | N

### Switch Events

Expand Down
4 changes: 2 additions & 2 deletions packages/uniapp-components/switch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ icon | Array | [] | 开关的图标;[打开时的图标,关闭时的图标]
label | Array | [] | 开关内容,[开启时内容,关闭时内容]。示例:['开', '关'] 。TS 类型:`string[]` | N
loading | Boolean | false | 是否处于加载中状态 | N
size | String | medium | 开关尺寸。可选项:small/medium/large | N
value | String / Number / Boolean | - | 开关值。支持语法糖 `v-model:value`。TS 类型:`SwitchValue` `type SwitchValue = string \| number \| boolean`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/switch/type.ts) | N
default-value | String / Number / Boolean | - | 开关值。非受控属性。TS 类型:`SwitchValue` `type SwitchValue = string \| number \| boolean`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/packages/uniapp-components/switch/type.ts) | N
value | String / Number / Boolean | - | 开关值。支持语法糖 `v-model:value`。TS 类型:`SwitchValue` `type SwitchValue = string \| number \| boolean`。[详细类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/switch/type.ts) | N
default-value | String / Number / Boolean | - | 开关值。非受控属性。TS 类型:`SwitchValue` `type SwitchValue = string \| number \| boolean`。[详细类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/switch/type.ts) | N

### Switch Events

Expand Down
2 changes: 1 addition & 1 deletion packages/uniapp-components/switch/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
* */

export interface TdSwitchProps<T = SwitchValue> {
export interface TdSwitchProps {
/**
* 用于自定义开关的值,[打开时的值,关闭时的值]。默认为 [true, false]。示例:[1, 0]、['open', 'close']
* @default [true, false]
Expand Down
Loading