mirror of
https://git.hmsn.ink/kospo/svcm/oa.git
synced 2026-03-20 07:53:48 +09:00
71 lines
1.3 KiB
Markdown
71 lines
1.3 KiB
Markdown
---
|
|
state:
|
|
input: 2
|
|
---
|
|
|
|
### Readonly and disabled
|
|
|
|
To make the rating component readonly or disabled, use the `readonly` and `disabled` props.
|
|
The `readonly` prop will make the rating component readonly by disabling
|
|
the user interaction, while the `disabled` prop will make the rating component
|
|
disabled by disabling value changes.
|
|
|
|
<!--code-->
|
|
|
|
```vue
|
|
<script setup lang="ts">
|
|
|
|
const input = ref(2)
|
|
</script>
|
|
|
|
<template>
|
|
<div
|
|
class="is-flex is-justify-content-space-between is-flex-wrap-wrap"
|
|
:style="{ gap: '2rem' }"
|
|
>
|
|
<VField>
|
|
<VControl>
|
|
<VRangeRating
|
|
v-model="input"
|
|
label="Readonly"
|
|
readonly
|
|
/>
|
|
</VControl>
|
|
</VField>
|
|
<VField>
|
|
<VControl>
|
|
<VRangeRating
|
|
v-model="input"
|
|
label="Disabled"
|
|
disabled
|
|
/>
|
|
</VControl>
|
|
</VField>
|
|
</div>
|
|
</template>
|
|
```
|
|
|
|
<!--/code-->
|
|
|
|
<!--example-->
|
|
|
|
<div>
|
|
<div
|
|
class="is-flex is-flex-wrap-wrap"
|
|
:style="{ gap: '2rem' }"
|
|
>
|
|
<VField>
|
|
<VControl>
|
|
<VRangeRating v-model="frontmatter.state.input" label="Readonly" readonly />
|
|
</VControl>
|
|
</VField>
|
|
<VField>
|
|
<VControl>
|
|
<VRangeRating v-model="frontmatter.state.input" label="Disabled" disabled />
|
|
</VControl>
|
|
</VField>
|
|
</div>
|
|
</div>
|
|
|
|
<!--/example-->
|