diff --git a/frontend/src/components/business/ms-add-attachment/dropdownMenu.vue b/frontend/src/components/business/ms-add-attachment/dropdownMenu.vue index 7354dc6530..0b516c725a 100644 --- a/frontend/src/components/business/ms-add-attachment/dropdownMenu.vue +++ b/frontend/src/components/business/ms-add-attachment/dropdownMenu.vue @@ -8,7 +8,7 @@ @@ -218,7 +225,7 @@ import MsTag, { Size } from '@/components/pure/ms-tag/ms-tag.vue'; import MsTagsInput from '@/components/pure/ms-tags-input/index.vue'; import MsUpload from '@/components/pure/ms-upload/index.vue'; - import type { MsFileItem } from '@/components/pure/ms-upload/types'; + import type { MsFileItem, UploadType } from '@/components/pure/ms-upload/types'; import LinkFileDrawer from '@/components/business/ms-link-file/associatedFileDrawer.vue'; import dropdownMenu from './dropdownMenu.vue'; import saveAsFilePopover from './saveAsFilePopover.vue'; @@ -237,6 +244,7 @@ defineProps<{ disabled?: boolean; mode?: 'button' | 'input'; + accept?: UploadType; multiple?: boolean; inputClass?: string; inputSize?: 'small' | 'medium' | 'large' | 'mini'; diff --git a/frontend/src/components/business/ms-link-file/associatedFileDrawer.vue b/frontend/src/components/business/ms-link-file/associatedFileDrawer.vue index c823373f8e..9443f27088 100644 --- a/frontend/src/components/business/ms-link-file/associatedFileDrawer.vue +++ b/frontend/src/components/business/ms-link-file/associatedFileDrawer.vue @@ -73,6 +73,7 @@ :get-list-fun-params="props.getListFunParams" :selector-type="props.selectorType" :file-all-count-by-storage="fileAllCountByStorage" + :filetype="props.filetype" @init="handleModuleTableInit" /> @@ -105,6 +106,7 @@ getListRequest: (params: TableQueryParams) => Promise>; // 获取表格请求 getListFunParams: TableQueryParams; // 关联表去重id selectorType?: 'none' | 'checkbox' | 'radio'; + filetype?: string; }>(); const emit = defineEmits<{ diff --git a/frontend/src/components/business/ms-link-file/linkFileTable.vue b/frontend/src/components/business/ms-link-file/linkFileTable.vue index ba340d2302..a3af1b219f 100644 --- a/frontend/src/components/business/ms-link-file/linkFileTable.vue +++ b/frontend/src/components/business/ms-link-file/linkFileTable.vue @@ -6,7 +6,13 @@ >({{ moduleInfo.count }})
- + {{ t('common.all') }} {{ item }} @@ -91,6 +97,7 @@ getListFunParams: TableQueryParams; // 表格额外去重参数 selectorType?: 'none' | 'checkbox' | 'radio'; fileAllCountByStorage: number; + filetype?: string; }>(); const emit = defineEmits<{ (e: 'init', params: FileListQueryParams): void; @@ -98,7 +105,7 @@ }>(); const tableFileTypeOptions = ref([]); - const tableFileType = ref(''); // 文件格式筛选 + const tableFileType = ref(props.filetype || ''); // 文件格式筛选 const keyword = ref(''); const fileTypeLoading = ref(false); const fileType = ref('module'); // 当前查看的文件类型,模块/存储库 @@ -249,7 +256,7 @@ } else { res = await getFileTypes(appStore.currentProjectId); } - tableFileType.value = ''; + tableFileType.value = props.filetype || ''; tableFileTypeOptions.value = res; } catch (error) { // eslint-disable-next-line no-console diff --git a/frontend/src/views/api-test/components/paramTable.vue b/frontend/src/views/api-test/components/paramTable.vue index cae4df6abd..03ab67a5fb 100644 --- a/frontend/src/views/api-test/components/paramTable.vue +++ b/frontend/src/views/api-test/components/paramTable.vue @@ -260,6 +260,7 @@ id: 'fileId', name: 'fileAlias', }" + :accept="columnConfig.accept" :file-save-as-source-id="props.fileSaveAsSourceId" :file-save-as-api="props.fileSaveAsApi" :file-module-options-api="props.fileModuleOptionsApi" @@ -280,7 +281,7 @@ /> -