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> </div>
</slot> </slot>
</div> </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-row>
<el-col :xs="24" :md="12" :style="{ height: '350px' }"> <el-col :xs="24" :md="12" :style="{ height: '350px' }">
<VueCropper <VueCropper
@ -88,6 +88,7 @@ const props = withDefaults(defineProps<{
/** 文件信息请求函数 */ /** 文件信息请求函数 */
fileFunction: (fileId?: number | string) => Promise<FileVO> fileFunction: (fileId?: number | string) => Promise<FileVO>
disabled?: boolean disabled?: boolean
title?: string
}>(), { }>(), {
accpet: '.jpeg,.jpg,.png,.bmp', accpet: '.jpeg,.jpg,.png,.bmp',
fileId: '', fileId: '',
@ -95,6 +96,7 @@ const props = withDefaults(defineProps<{
fileSize: 2, fileSize: 2,
autoCropHeight: 200, autoCropHeight: 200,
autoCropWidth: 200, autoCropWidth: 200,
title: '上传头像',
}) })
const emit = defineEmits<{ const emit = defineEmits<{

View File

@ -2,7 +2,7 @@
* @Author: zhaojinfeng 121016171@qq.com * @Author: zhaojinfeng 121016171@qq.com
* @Date: 2023-07-18 12:28:36 * @Date: 2023-07-18 12:28:36
* @LastEditors: zhaojinfeng 121016171@qq.com * @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 * @FilePath: \vue3\stories\UploadAvatar.stories.ts
* @Description: * @Description:
* *
@ -23,6 +23,7 @@ const meta = {
fileSize: 2, fileSize: 2,
autoCropHeight: 200, autoCropHeight: 200,
autoCropWidth: 200, autoCropWidth: 200,
title: '上传头像',
uploadFunction() { uploadFunction() {
return Promise.resolve({ return Promise.resolve({
id: 0, id: 0,