naive-ui/demo/documentation/components/checkbox/zhCN/controlled.md
2020-02-04 17:52:31 +08:00

19 lines
239 B
Markdown

# 受控状态
```html
<n-checkbox :checked="value">复选框</n-checkbox>
<n-switch v-model="value"/>
```
```js
export default {
data() {
return {
value: false
}
}
}
```
```css
.n-checkbox {
margin: 0 12px 8px 0;
}
```