Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update:checkbox文档增加slot的内容,跟随pr#897提交 #38

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
21 changes: 20 additions & 1 deletion docs/components/checkbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,23 @@ export default {
</u-checkbox-group>
```

### 自定义文字插槽

可以通过默认插槽更改`label`

**注意:** nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式

```html
<u-checkbox-group>
<u-checkbox v-model="checked" shape="circle">自定义文字</u-checkbox>
</u-checkbox-group>
```


### 横向排列形式

可以通过设置`placement`为`row`或者`column`,将复选框设置为横向排列或者竖向排列


```html
<u-checkbox-group v-model="checked" placement="row">
<u-checkbox activeColor="red" label="红色"></u-checkbox>
Expand Down Expand Up @@ -262,6 +274,13 @@ export default {
| labelDisabled | 是否禁止点击提示语选中复选框 | String \ Boolean | - | - |


### Checkbox Slot

| 名称 | 说明 |
| :- | :- |
| 默认插槽 | 自定义`label`内容,注意:在nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式 |
| icon | 自定义图标 |


### CheckboxGroup Props

Expand Down