Browse Source

!4 update im-admin-ui/src/components/ImageUpload/index.vue.

Merge pull request !4 from 老周/N/A
master
blue 1 year ago
committed by Gitee
parent
commit
3e49d4c644
No known key found for this signature in database GPG Key ID: 173E9B9CA92EEF8F
  1. 3
      im-admin-ui/src/components/ImageUpload/index.vue

3
im-admin-ui/src/components/ImageUpload/index.vue

@ -59,7 +59,7 @@ const props = defineProps({
}); });
const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const emit = defineEmits(['update:modelValue']); const emit = defineEmits(['update:modelValue', 'on-success']);
const dialogImageUrl = ref(''); const dialogImageUrl = ref('');
const dialogVisible = ref(false); const dialogVisible = ref(false);
@ -99,6 +99,7 @@ const handleBeforeUpload = (file: any) => {
// //
const handleUploadSuccess = (res: any) => { const handleUploadSuccess = (res: any) => {
if (res.code === 200) { if (res.code === 200) {
emit('on-success', res.data);
emit('update:modelValue', res.data.originUrl); emit('update:modelValue', res.data.originUrl);
} else { } else {
emit('update:modelValue', ''); emit('update:modelValue', '');

Loading…
Cancel
Save