fix: crud组件代码增加控件是否监听到查询条件改变时自动触发搜索事件
This commit is contained in:
parent
1b2e99522e
commit
58f07cbc78
|
|
@ -152,6 +152,7 @@ import dayjs from "dayjs";
|
|||
// 定义接收的属性
|
||||
const props = defineProps<{
|
||||
searchConfig: ISearchConfig;
|
||||
isOpenAutoSearch: Boolean;
|
||||
}>();
|
||||
// 自定义事件
|
||||
const emit = defineEmits<{
|
||||
|
|
@ -321,7 +322,11 @@ function timeChange(e: any, key: string) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
watch(queryParams, () => {
|
||||
if (props.isOpenAutoSearch) {
|
||||
emit("queryClick", queryParams);
|
||||
}
|
||||
});
|
||||
// 暴露的属性和方法
|
||||
defineExpose({ getQueryParams, toggleVisible, setQueryValue });
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue