From fb0a0cd7198e0f9a9582f0cc39dcf9053bed6d73 Mon Sep 17 00:00:00 2001 From: odjbin <1042039504@qq.com> Date: Fri, 25 Oct 2024 23:11:01 +0800 Subject: [PATCH] =?UTF-8?q?fix=20:=20=E4=BF=AE=E5=A4=8D=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E5=BE=85=E7=AB=8B=E9=A1=B9=E7=AD=89=E4=BB=BB=E5=8A=A1=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E5=8F=8A=E5=90=84=E7=A7=8D=E7=B1=BB=E5=9E=8B=E6=96=87?= =?UTF-8?q?=E7=AB=A0=E8=B7=B3=E8=BD=AC=E6=98=BE=E7=A4=BA=E5=AF=B9=E5=BA=94?= =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/fvcomponents/fvSearchForm/index.vue | 18 ++++++++++++- src/views/article-management/index.vue | 26 ++++++++++++++----- src/views/home/index.vue | 22 +++++++++++++--- .../implementation/index.vue | 2 +- .../project-management/initiation/index.vue | 2 +- 5 files changed, 58 insertions(+), 12 deletions(-) diff --git a/src/fvcomponents/fvSearchForm/index.vue b/src/fvcomponents/fvSearchForm/index.vue index a9457f8..ef812be 100644 --- a/src/fvcomponents/fvSearchForm/index.vue +++ b/src/fvcomponents/fvSearchForm/index.vue @@ -52,6 +52,16 @@ const props = defineProps({ searchConfig: { type: Array, default: [] + }, + //搜索参数 + searchProp: { + type: String, + default: '' + }, + //搜索值 + searchValue: { + type: String, + default: '' } }) @@ -68,7 +78,10 @@ const filterConfig = computed(() => { }) return arr.length >= 4 && showMore.value ? arr : arr.slice(0, 3) }) - +const setForm=(prop,value)=>{ + form.value[prop]=value + return form.value; +} // 搜索功能表单元素默认值 // const setDefaultFormValues = () => { // filterConfig.value.forEach(item => { @@ -80,6 +93,9 @@ watchEffect(() => { if (filterConfig.value.length) { // setDefaultFormValues() } + if(props.searchProp&&props.searchValue){ + setForm(props.searchProp,props.searchValue) + } }) const elChange = () => { diff --git a/src/views/article-management/index.vue b/src/views/article-management/index.vue index 5d951dc..1fac2d2 100644 --- a/src/views/article-management/index.vue +++ b/src/views/article-management/index.vue @@ -1,7 +1,7 @@