From bc7d869a3b81fdce95e231439ddc16dbe3b901cb Mon Sep 17 00:00:00 2001 From: ZiuChen <457353192@qq.com> Date: Thu, 18 Aug 2022 16:46:52 +0800 Subject: [PATCH 1/6] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E6=B8=85?= =?UTF-8?q?=E7=A9=BA=E6=90=9C=E7=B4=A2=E6=A1=86=E7=9A=84=E6=8C=89=E9=92=AE?= =?UTF-8?q?=20#18?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cpns/ClipSearch.vue | 4 ++++ src/style/cpns/clip-search.less | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/cpns/ClipSearch.vue b/src/cpns/ClipSearch.vue index 7dc8048..95e5705 100644 --- a/src/cpns/ClipSearch.vue +++ b/src/cpns/ClipSearch.vue @@ -1,6 +1,7 @@ @@ -16,11 +17,14 @@ const filterText = ref('') const emit = defineEmits(['update:modelValue']) // filterText变了 通知父组件修改 modelValue的值 watch(filterText, (val) => emit('update:modelValue', val)) + // modelValue变了 更新 filterText的值 watch( () => props.modelValue, (val) => (filterText.value = val) ) + +const clear = () => emit('update:modelValue', '')