Skip to content

Commit

Permalink
fix-checkbox&radio 组件ts调整 & 文档调整
Browse files Browse the repository at this point in the history
  • Loading branch information
OneDream2000 committed Jan 11, 2024
1 parent 2984944 commit 4c2dcff
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions docs/components/TCheckbox/base.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ TCheckbox/base

### 尺寸大小

:::demo 通过 size 属性用来控制单选框的大小
:::demo 通过 size 属性用来控制多选框的大小
TCheckbox/size
:::

### 按钮样式

:::demo 你可以让单选框看起来像一个按钮一样, 只需要将`type`属性设置为 button
:::demo 你可以让多选框看起来像一个按钮一样, 只需要将`type`属性设置为 button
TCheckbox/button
:::

### 带有边框

:::demo 设置 border 属性为 true 可以渲染为带有边框的单选框
:::demo 设置 border 属性为 true 可以渲染为带有边框的多选框
TCheckbox/border
:::

Expand All @@ -42,8 +42,8 @@ TCheckbox/props
| :-------------------- | :------------------- | :---------------------------- | :-------- |
| model-value / v-model | 绑定值 | Array ||
| option | 单选数据源 | Array ||
| size | 单选框的尺寸 | 'large' / 'default' / 'small' | 'default' |
| type | 按钮样式 | 'radio' / 'button' | 'radio' |
| size | 多选框的尺寸 | 'large' / 'default' / 'small' | 'default' |
| type | 按钮样式 | 'check' / 'button' | 'check' |
| props | 配置选项,具体看下表 | object | - |
| border | 是否显示边框 | boolean | false |

Expand Down
6 changes: 3 additions & 3 deletions packages/checkbox/src/checkbox.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ export interface OptionsProps {
}

export interface CheckboxItem {
value: string
value: string | number | boolean
label: string
slot: string
disabled: boolean
slot?: string
disabled?: boolean
}
6 changes: 3 additions & 3 deletions packages/radio/src/radio.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ export interface OptionsProps {
}

export interface RadioItem {
value: string
value: string | number | boolean
label: string
slot: string
disabled: boolean
slot?: string
disabled?: boolean
}

0 comments on commit 4c2dcff

Please sign in to comment.