From 11bdda1a4b4e8275876bf6910c7ed242580b6fa9 Mon Sep 17 00:00:00 2001 From: zhaojinfeng <121016171@qq.com> Date: Fri, 21 Jul 2023 21:53:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=95=85=E4=BA=8B=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- stories/UploadAvatar.stories.ts | 18 +++++++++++++++++- types/components.d.ts | 4 +--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/stories/UploadAvatar.stories.ts b/stories/UploadAvatar.stories.ts index 1e6efde..3b34285 100644 --- a/stories/UploadAvatar.stories.ts +++ b/stories/UploadAvatar.stories.ts @@ -2,7 +2,7 @@ * @Author: zhaojinfeng 121016171@qq.com * @Date: 2023-07-18 12:28:36 * @LastEditors: zhaojinfeng 121016171@qq.com - * @LastEditTime: 2023-07-21 16:34:51 + * @LastEditTime: 2023-07-21 21:52:48 * @FilePath: \vue3\stories\UploadAvatar.stories.ts * @Description: * @@ -40,11 +40,27 @@ type Story = StoryObj export const Base: Story = { name: '基本使用', + args: { + fileUrl: avatar, + disabled: true, + fileFunction() { + return Promise.resolve({ + id: 1, + url: avatar, + }) + }, + }, } export const Preview: Story = { name: '启用disabled,当做预览组件', args: { fileUrl: avatar, disabled: true, + fileFunction() { + return Promise.resolve({ + id: 2, + url: avatar, + }) + }, }, } diff --git a/types/components.d.ts b/types/components.d.ts index df6d55f..5a9a5c1 100644 --- a/types/components.d.ts +++ b/types/components.d.ts @@ -13,6 +13,7 @@ declare module 'vue' { ElCol: typeof import('element-plus/es')['ElCol'] ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] ElDialog: typeof import('element-plus/es')['ElDialog'] + ElEmpty: typeof import('element-plus/es')['ElEmpty'] ElForm: typeof import('element-plus/es')['ElForm'] ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElIcon: typeof import('element-plus/es')['ElIcon'] @@ -26,7 +27,6 @@ declare module 'vue' { ElSpace: typeof import('element-plus/es')['ElSpace'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] - ElUpload: typeof import('element-plus/es')['ElUpload'] Header: typeof import('./../packages/header/index.vue')['default'] PreviewOffice: typeof import('./../packages/preview-office/index.vue')['default'] PreviewOfficeView: typeof import('./../packages/preview-office-view/index.vue')['default'] @@ -34,8 +34,6 @@ declare module 'vue' { RouterView: typeof import('vue-router')['RouterView'] SelectTableModal: typeof import('./../packages/select-table-modal/index.vue')['default'] UploadAvatar: typeof import('./../packages/upload-avatar/index.vue')['default'] - Uploadmultiplefile: typeof import('./../packages/uploadmultiplefile/index.vue')['default'] - UploadMultipleFile: typeof import('./../packages/upload-multiple-file/index.vue')['default'] UploadSingleFile: typeof import('./../packages/upload-single-file/index.vue')['default'] UploadTable: typeof import('./../packages/upload-table/index.vue')['default'] }