mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
19 lines
245 B
Markdown
19 lines
245 B
Markdown
|
# Controlled Checkbox
|
||
|
```html
|
||
|
<n-checkbox :checked="value">Checkbox</n-checkbox>
|
||
|
<n-switch v-model="value"/>
|
||
|
```
|
||
|
```js
|
||
|
export default {
|
||
|
data() {
|
||
|
return {
|
||
|
value: false
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
```
|
||
|
```css
|
||
|
.n-checkbox {
|
||
|
margin: 0 12px 8px 0;
|
||
|
}
|
||
|
```
|