You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
688 B
40 lines
688 B
3 years ago
|
<docs>
|
||
|
---
|
||
|
order: 4
|
||
|
title:
|
||
|
zh-CN: 清除
|
||
|
en-US: Clear star
|
||
|
---
|
||
|
|
||
|
## zh-CN
|
||
|
|
||
|
支持允许或者禁用清除。
|
||
|
|
||
|
## en-US
|
||
|
|
||
|
Support set allow to clear star when click again.
|
||
|
|
||
|
</docs>
|
||
|
<template>
|
||
|
<div>
|
||
|
<a-rate v-model:value="value1" />
|
||
|
<span class="ant-rate-text">allowClear: true</span>
|
||
|
<br />
|
||
|
<a-rate v-model:value="value2" :allow-clear="false" />
|
||
|
<span class="ant-rate-text">allowClear: false</span>
|
||
|
</div>
|
||
|
</template>
|
||
|
<script lang="ts">
|
||
|
import { defineComponent, ref } from 'vue';
|
||
|
export default defineComponent({
|
||
|
setup() {
|
||
|
const value1 = ref<number>(3);
|
||
|
const value2 = ref<number>(3);
|
||
|
return {
|
||
|
value1,
|
||
|
value2,
|
||
|
};
|
||
|
},
|
||
|
});
|
||
|
</script>
|