fix : 修复首页待立项等任务跳转及各种类型文章跳转显示对应数据

This commit is contained in:
2024-10-25 23:11:01 +08:00
parent 5c2ec69fd6
commit fb0a0cd719
5 changed files with 58 additions and 12 deletions

View File

@@ -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 = () => {