From d407bc3c41285408dd145fb7905d374efb39826e Mon Sep 17 00:00:00 2001 From: AhJindeg Date: Fri, 23 Aug 2024 10:32:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9E=20Fixed=20the=20clearable?= =?UTF-8?q?=20invalid=20issue=20of=20IconSelect=20component=20for=20MenuFo?= =?UTF-8?q?rm=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修复 MenuForm 页面 IconSelect 组件可清除无效问题 --- src/components/Icon/src/IconSelect.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/Icon/src/IconSelect.vue b/src/components/Icon/src/IconSelect.vue index d4a5b074..b19c5e3b 100644 --- a/src/components/Icon/src/IconSelect.vue +++ b/src/components/Icon/src/IconSelect.vue @@ -11,6 +11,10 @@ const props = defineProps({ modelValue: { require: false, type: String + }, + clearable: { + require: false, + type: Boolean } }) const emit = defineEmits<{ (e: 'update:modelValue', v: string) }>() @@ -92,6 +96,12 @@ function onCurrentChange(page) { currentPage.value = page } +function clearIcon() { + icon.value = '' + emit('update:modelValue', '') + visible.value = false +} + watch( () => { return props.modelValue @@ -115,7 +125,7 @@ watch(