fix : 修复首页待立项等任务跳转及各种类型文章跳转显示对应数据
This commit is contained in:
@@ -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 = () => {
|
||||
|
||||
Reference in New Issue
Block a user