refactor: 自动获取文件对象

This commit is contained in:
2023-07-22 14:39:03 +08:00
parent db2e8dd6d5
commit f5dc4b2068
2 changed files with 44 additions and 22 deletions

View File

@ -1,10 +1,34 @@
/*
* @Author: zhaojinfeng 121016171@qq.com
* @Date: 2023-07-21 12:25:52
* @LastEditors: zhaojinfeng 121016171@qq.com
* @LastEditTime: 2023-07-22 14:38:22
* @FilePath: \vue3\stories\DownloadLink.stories.ts
* @Description:
*
*/
import type { Meta, StoryObj } from '@storybook/vue3'
import ThDownloadLink from '../packages/download-link/index.vue'
import avatar from './assets/avatar.jpeg'
const meta = {
title: '数据展示/DownloadLink',
component: ThDownloadLink,
tags: ['autodocs'],
args: {
fileName: '文件名',
/**
* 下载文件的请求源
*
* 可以是文件名或URL。
*
*/
src: '文件ID',
/** 文件信息请求函数 */
request: () => Promise.resolve({
url: avatar,
}),
},
} satisfies Meta<typeof ThDownloadLink>
export default meta