diff --git a/package/component/src/component/rate/index.vue b/package/component/src/component/rate/index.vue index f3a39ac8..ceb830a6 100644 --- a/package/component/src/component/rate/index.vue +++ b/package/component/src/component/rate/index.vue @@ -16,7 +16,7 @@ export interface LayRateProps { half?: boolean; text?: boolean; isBlock?: boolean; - hasClear?: boolean; + allowClear?: boolean; clearIcon?: string; icons?: string[]; } @@ -28,7 +28,7 @@ const props = withDefaults(defineProps(), { half: false, text: false, isBlock: false, - hasClear: false, + allowClear: false, clearIcon: "layui-icon-close-fill", icons: () => [ "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 () { tempValue.value = 0; currentValue.value = 0; diff --git a/package/document-component/src/document/zh-CN/components/rate.md b/package/document-component/src/document/zh-CN/components/rate.md index 00a88731..c5a9af8e 100644 --- a/package/document-component/src/document/zh-CN/components/rate.md +++ b/package/document-component/src/document/zh-CN/components/rate.md @@ -95,7 +95,7 @@ export default { ::: demo