feat: title

This commit is contained in:
2023-07-21 22:44:05 +08:00
parent d692191873
commit 4c299178bd
2 changed files with 5 additions and 2 deletions

View File

@ -14,7 +14,7 @@
</div>
</slot>
</div>
<el-dialog v-if="!disabled" v-model="showDialog" title="上传头像" width="800px" append-to-body @opened="modalOpened" @closed="closeDialog">
<el-dialog v-if="!disabled" v-model="showDialog" :title="title" width="800px" append-to-body @opened="modalOpened" @closed="closeDialog">
<el-row>
<el-col :xs="24" :md="12" :style="{ height: '350px' }">
<VueCropper
@ -88,6 +88,7 @@ const props = withDefaults(defineProps<{
/** 文件信息请求函数 */
fileFunction: (fileId?: number | string) => Promise<FileVO>
disabled?: boolean
title?: string
}>(), {
accpet: '.jpeg,.jpg,.png,.bmp',
fileId: '',
@ -95,6 +96,7 @@ const props = withDefaults(defineProps<{
fileSize: 2,
autoCropHeight: 200,
autoCropWidth: 200,
title: '上传头像',
})
const emit = defineEmits<{

View File

@ -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 21:52:48
* @LastEditTime: 2023-07-21 22:43:52
* @FilePath: \vue3\stories\UploadAvatar.stories.ts
* @Description:
*
@ -23,6 +23,7 @@ const meta = {
fileSize: 2,
autoCropHeight: 200,
autoCropWidth: 200,
title: '上传头像',
uploadFunction() {
return Promise.resolve({
id: 0,