fix:修复文件管理左侧‘全部’查询问题

This commit is contained in:
秋帆
2024-05-21 19:23:32 +08:00
parent b0552779ba
commit d6c5b8988c

View File

@@ -96,7 +96,7 @@ const { mode, selectedFileIds, toggleMode, addSelectedFileItem } = useFileManage
const queryForm = reactive<FileQuery>({ const queryForm = reactive<FileQuery>({
name: undefined, name: undefined,
type: route.query.type?.toString() || undefined, type: route.query.type?.toString() !== '0' ? route.query.type?.toString() : undefined,
sort: ['updateTime,desc'] sort: ['updateTime,desc']
}) })
const paginationOption = reactive({ const paginationOption = reactive({
@@ -209,7 +209,12 @@ const handleUpload = (options: RequestOption) => {
onBeforeRouteUpdate((to) => { onBeforeRouteUpdate((to) => {
if (!to.query.type) return if (!to.query.type) return
if (to.query.type === '0') {
queryForm.type = undefined
} else {
queryForm.type = to.query.type?.toString() queryForm.type = to.query.type?.toString()
}
search() search()
}) })