diff --git a/src/components/core/dynamic-table/src/dynamic-table.ts b/src/components/core/dynamic-table/src/dynamic-table.ts index 66a46d7..95789d2 100644 --- a/src/components/core/dynamic-table/src/dynamic-table.ts +++ b/src/components/core/dynamic-table/src/dynamic-table.ts @@ -129,6 +129,7 @@ export const dynamicTableEmits = { change: (...rest: OnChangeCallbackParams) => rest.length === 4, 'toggle-advanced': (isAdvanced: boolean) => isBoolean(isAdvanced), 'fetch-error': (error) => error, + 'on-fetch': (loading: boolean) => isBoolean(loading), 'update:expandedRowKeys': (keys: Key[]) => keys, 'expanded-rows-change': (keyValues: string[]) => Array.isArray(keyValues), }; diff --git a/src/components/core/dynamic-table/src/hooks/useTableMethods.ts b/src/components/core/dynamic-table/src/hooks/useTableMethods.ts index a74673a..cff7254 100644 --- a/src/components/core/dynamic-table/src/hooks/useTableMethods.ts +++ b/src/components/core/dynamic-table/src/hooks/useTableMethods.ts @@ -62,10 +62,11 @@ export const useTableMethods = ({ state, props, emit }: UseTableMethodsContext) */ const fetchData = debounce(async (params = {}) => { const { dataRequest, dataSource, fetchConfig, searchParams } = props; - + emit('on-fetch', true); if (!dataRequest || !isFunction(dataRequest) || Array.isArray(dataSource)) { return; } + try { let pageParams: Recordable = {}; const pagination = unref(paginationRef)!; @@ -132,7 +133,8 @@ export const useTableMethods = ({ state, props, emit }: UseTableMethodsContext) return tableData; } catch (error) { warn(`表格查询出错:${error}`); - emit('fetch-error', error); + + emit('on-fetch', true); tableData.value = []; updatePagination({ total: 0 }); } finally { diff --git a/src/views/netdisk/components/file-operate-button-list.vue b/src/views/netdisk/components/file-operate-button-list.vue index 7debc5e..16156f1 100644 --- a/src/views/netdisk/components/file-operate-button-list.vue +++ b/src/views/netdisk/components/file-operate-button-list.vue @@ -203,6 +203,8 @@ emit('update:searchKey', ''); return; } + message.info('全盘搜索功能暂未实现,敬请期待'); + return; await showModal({ modalProps: { title: '全盘搜索', diff --git a/src/views/netdisk/components/file-preview-drawer.vue b/src/views/netdisk/components/file-preview-drawer.vue index 36b4658..4e1a174 100644 --- a/src/views/netdisk/components/file-preview-drawer.vue +++ b/src/views/netdisk/components/file-preview-drawer.vue @@ -26,7 +26,7 @@ - + @@ -69,11 +69,11 @@ const detailInfoMap = new Map([ ['name', '文件名'], ['mimeType', '文件类型'], - ['hash', '文件Hash'], - ['md5', '文件MD5'], + // ['hash', '文件Hash'], + // ['md5', '文件MD5'], ['fsize', '文件大小'], ['putTime', '上传时间'], - ['uploader', '上传人员'], + // ['uploader', '上传人员'], ] as const); const loading = ref(false); diff --git a/src/views/netdisk/manage.vue b/src/views/netdisk/manage.vue index bf7c043..4424050 100644 --- a/src/views/netdisk/manage.vue +++ b/src/views/netdisk/manage.vue @@ -25,16 +25,17 @@ /> - + @@ -71,7 +75,7 @@ import { createContextMenu } from '@/components/basic/context-menu'; import { useTable } from '@/components/core/dynamic-table'; import { hasPermission } from '@/permission'; - + import { Button } from 'ant-design-vue'; defineOptions({ name: 'NetDiskManage', });