naive-ui/demo/documentation/components/checkbox/zhCN/basic.md

22 lines
416 B
Markdown
Raw Normal View History

2020-02-04 17:52:31 +08:00
# 基础用法
```html
<n-checkbox v-model="value">复选框</n-checkbox>
<n-checkbox v-model="value"/>
<n-checkbox v-model="value" :disabled="disabled">复选框</n-checkbox>
<n-button @click="disabled = !disabled" size="small">禁用</n-button>
```
```js
export default {
data() {
return {
value: false,
disabled: true
}
}
}
```
```css
.n-checkbox, .n-button {
margin: 0 12px 8px 0;
}
```