From 67d41b413d77088a04db304cecc9a00267f987a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?0o=E5=BC=A0=E4=B8=8D=E6=AD=AAo0?= Date: Mon, 18 Jul 2022 14:34:39 +0800 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F(component):=20rate=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=20has-clear=E6=94=B9=E4=B8=BAallow-clear?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package/component/src/component/rate/index.vue | 6 +++--- .../src/document/zh-CN/components/rate.md | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) 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