Merge branch 'next' of https://gitee.com/layui/layui-vue into next
This commit is contained in:
commit
f37d9c3f0c
@ -16,7 +16,7 @@ export interface LayRateProps {
|
|||||||
half?: boolean;
|
half?: boolean;
|
||||||
text?: boolean;
|
text?: boolean;
|
||||||
isBlock?: boolean;
|
isBlock?: boolean;
|
||||||
hasClear?: boolean;
|
allowClear?: boolean;
|
||||||
clearIcon?: string;
|
clearIcon?: string;
|
||||||
icons?: string[];
|
icons?: string[];
|
||||||
}
|
}
|
||||||
@ -28,7 +28,7 @@ const props = withDefaults(defineProps<LayRateProps>(), {
|
|||||||
half: false,
|
half: false,
|
||||||
text: false,
|
text: false,
|
||||||
isBlock: false,
|
isBlock: false,
|
||||||
hasClear: false,
|
allowClear: false,
|
||||||
clearIcon: "layui-icon-close-fill",
|
clearIcon: "layui-icon-close-fill",
|
||||||
icons: () => [
|
icons: () => [
|
||||||
"layui-icon-rate",
|
"layui-icon-rate",
|
||||||
@ -83,7 +83,7 @@ const action = function (index: number, event: any) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 清除评分图标
|
// 清除评分图标
|
||||||
const showClearIcon = computed(() => !props.readonly && props.hasClear);
|
const showClearIcon = computed(() => !props.readonly && props.allowClear);
|
||||||
const clearRate = function () {
|
const clearRate = function () {
|
||||||
tempValue.value = 0;
|
tempValue.value = 0;
|
||||||
currentValue.value = 0;
|
currentValue.value = 0;
|
||||||
|
@ -95,7 +95,7 @@ export default {
|
|||||||
::: demo
|
::: demo
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<lay-rate v-model="clearHalf" :half="true" :is-block="true" has-clear></lay-rate>
|
<lay-rate v-model="clearHalf" :half="true" :is-block="true" allow-clear></lay-rate>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -313,7 +313,7 @@ export default {
|
|||||||
| half | 设定组件是否可以选择半星 | `boolean` | false |
|
| half | 设定组件是否可以选择半星 | `boolean` | false |
|
||||||
| text | 是否显示评分对应的内容 | `boolean` | false |
|
| text | 是否显示评分对应的内容 | `boolean` | false |
|
||||||
| is-block | 评分是否显示为快元素 | `boolean` | false |
|
| is-block | 评分是否显示为快元素 | `boolean` | false |
|
||||||
| has-clear | 评分是否需要清除功能 | `boolean` | false |
|
| allow-clear | 评分是否需要清除功能 | `boolean` | false |
|
||||||
| clear-icon | 评分清除功能使用的图标`class` | `string` | `layui-icon-close-fill` |
|
| clear-icon | 评分清除功能使用的图标`class` | `string` | `layui-icon-close-fill` |
|
||||||
| icons | 评分使用图标`class`;`["空心", "实心"]`/`["空心", "半心", "实心"]` | `string[]` | 星型 |
|
| icons | 评分使用图标`class`;`["空心", "实心"]`/`["空心", "半心", "实心"]` | `string[]` | 星型 |
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user