fix: 编译错误

This commit is contained in:
2023-07-21 04:30:18 +08:00
parent 735170b897
commit 7fe4908131
7 changed files with 38 additions and 28 deletions

View File

@ -2,14 +2,17 @@
* @Author: zhaojinfeng 121016171@qq.com
* @Date: 2023-07-21 00:37:46
* @LastEditors: zhaojinfeng 121016171@qq.com
* @LastEditTime: 2023-07-21 03:31:04
* @LastEditTime: 2023-07-21 04:02:43
* @FilePath: \vue3\packages\upload-single-file\index.vue
* @Description:
*
-->
<template>
<div v-loading="loading" @click="startUpload">
<slot :loading="loading">
<slot v-if="modelValue" name="download" :loading="loading">
<DownloadLink :src="modelValue" :file-name="fileName" />
</slot>
<slot v-else name="upload" :loading="loading">
<el-button type="primary" plain :text="text">
点击上传
</el-button>
@ -18,6 +21,8 @@
</template>
<script lang="ts" setup name="ThUploadSingleFile">
import DownloadLink from '../download-link/index.vue'
const props = withDefaults(defineProps<{
/** 文件id */
modelValue?: string | number