From 735170b8974629c49ecd9edbf76d73b8006d4063 Mon Sep 17 00:00:00 2001 From: zhaojinfeng <121016171@qq.com> Date: Fri, 21 Jul 2023 03:58:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=8B=E8=BD=BD=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/download-link/index.vue | 9 +- packages/upload-single-file/index.vue | 112 ++++++++++++++++++++ packages/upload-table/index.vue | 146 +++++++++++++++++--------- stories/UploadSingleFile.stories.ts | 36 +++++++ stories/UploadTable.stories.ts | 61 ++++++++++- types/components.d.ts | 8 +- types/file.d.ts | 5 + 7 files changed, 315 insertions(+), 62 deletions(-) create mode 100644 packages/upload-single-file/index.vue create mode 100644 stories/UploadSingleFile.stories.ts diff --git a/packages/download-link/index.vue b/packages/download-link/index.vue index ccfcdf1..b32deb0 100644 --- a/packages/download-link/index.vue +++ b/packages/download-link/index.vue @@ -2,7 +2,7 @@ * @Author: zhaojinfeng 121016171@qq.com * @Date: 2023-07-21 01:21:34 * @LastEditors: zhaojinfeng 121016171@qq.com - * @LastEditTime: 2023-07-21 01:51:17 + * @LastEditTime: 2023-07-21 03:57:13 * @FilePath: \vue3\packages\download-link\index.vue * @Description: 现在组件 * @@ -79,8 +79,11 @@ function download() { downloadByRequest(props.src) break case 'object': - if (typeof props.src?.url === 'string') - downloadByRequest(props.src.url) + if (typeof props.src?.url === 'string') { + url = props.src.url + type = 'success' + saveAs(props.src.url, props.src.name) + } break default: break diff --git a/packages/upload-single-file/index.vue b/packages/upload-single-file/index.vue new file mode 100644 index 0000000..93c48c8 --- /dev/null +++ b/packages/upload-single-file/index.vue @@ -0,0 +1,112 @@ + + + + diff --git a/packages/upload-table/index.vue b/packages/upload-table/index.vue index 6eac134..2a2c13d 100644 --- a/packages/upload-table/index.vue +++ b/packages/upload-table/index.vue @@ -1,54 +1,71 @@