mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-11-21 01:13:16 +08:00
docs(checkbox): optimize indeterminate demo
This commit is contained in:
parent
341f2e6765
commit
40c2068b31
@ -4,11 +4,8 @@
|
||||
|
||||
<template>
|
||||
<n-space item-style="display: flex;" align="center">
|
||||
<n-checkbox
|
||||
v-model:checked="value"
|
||||
:indeterminate="indeterminate"
|
||||
>
|
||||
checkbox
|
||||
<n-checkbox v-model:checked="value" :indeterminate="indeterminate">
|
||||
Checkbox
|
||||
</n-checkbox>
|
||||
<n-checkbox v-model:checked="value" :indeterminate="indeterminate" />
|
||||
<n-checkbox
|
||||
@ -16,15 +13,22 @@
|
||||
:indeterminate="indeterminate"
|
||||
disabled
|
||||
/>
|
||||
<n-button size="small" @click="value = !value">
|
||||
Check
|
||||
</n-button>
|
||||
<n-button
|
||||
size="small"
|
||||
@click="indeterminate = !indeterminate"
|
||||
>
|
||||
Indeterminate
|
||||
</n-button>
|
||||
<n-switch v-model:value="value">
|
||||
<template #checked>
|
||||
checked
|
||||
</template>
|
||||
<template #unchecked>
|
||||
Unchecked
|
||||
</template>
|
||||
</n-switch>
|
||||
<n-switch v-model:value="indeterminate">
|
||||
<template #checked>
|
||||
Indeterminate
|
||||
</template>
|
||||
<template #unchecked>
|
||||
Not indeterminate
|
||||
</template>
|
||||
</n-switch>
|
||||
</n-space>
|
||||
</template>
|
||||
|
||||
|
@ -4,10 +4,7 @@
|
||||
|
||||
<template>
|
||||
<n-space item-style="display: flex;" align="center">
|
||||
<n-checkbox
|
||||
v-model:checked="value"
|
||||
:indeterminate="indeterminate"
|
||||
>
|
||||
<n-checkbox v-model:checked="value" :indeterminate="indeterminate">
|
||||
复选框
|
||||
</n-checkbox>
|
||||
<n-checkbox v-model:checked="value" :indeterminate="indeterminate" />
|
||||
@ -16,15 +13,22 @@
|
||||
:indeterminate="indeterminate"
|
||||
disabled
|
||||
/>
|
||||
<n-button size="small" @click="value = !value">
|
||||
选中
|
||||
</n-button>
|
||||
<n-button
|
||||
size="small"
|
||||
@click="indeterminate = !indeterminate"
|
||||
>
|
||||
部分选中
|
||||
</n-button>
|
||||
<n-switch v-model:value="value">
|
||||
<template #checked>
|
||||
选中
|
||||
</template>
|
||||
<template #unchecked>
|
||||
没选中
|
||||
</template>
|
||||
</n-switch>
|
||||
<n-switch v-model:value="indeterminate">
|
||||
<template #checked>
|
||||
部分选中
|
||||
</template>
|
||||
<template #unchecked>
|
||||
非部分选中
|
||||
</template>
|
||||
</n-switch>
|
||||
</n-space>
|
||||
</template>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user