diff --git a/src/components/avatar-upload/avatar-upload.vue b/src/components/avatar-upload/avatar-upload.vue index 02d588d..441cd07 100644 --- a/src/components/avatar-upload/avatar-upload.vue +++ b/src/components/avatar-upload/avatar-upload.vue @@ -56,6 +56,7 @@ const props = defineProps({ const emit = defineEmits<{ (event: 'update:modelValue', value: string): void (event: 'upload', value: string): void + (event: 'update', value: string): void }>() const styles = computed(() => { @@ -73,6 +74,7 @@ const styles = computed(() => { const chooseAvatar = async (e: any) => { console.log(props.modelValue) + props.modelValue && emit('update', props.modelValue) // #ifdef APP-PLUS if (client == 6) { // const res = await uni.showModal({ @@ -90,13 +92,12 @@ const chooseAvatar = async (e: any) => { // #endif // #ifndef MP-WEIXIN - console.log(props) router.navigateTo({ path: '/uni_modules/vk-uview-ui/components/u-avatar-cropper/u-avatar-cropper?destWidth=300&rectWidth=200&fileType=jpg' }) // #endif // #ifdef MP-WEIXIN - console.log(props) + const path = e.detail?.avatarUrl if (path) { uploadImageIng(path) diff --git a/src/components/chat-scroll-view/chat-scroll-view.vue b/src/components/chat-scroll-view/chat-scroll-view.vue index b30f0cf..01db046 100644 --- a/src/components/chat-scroll-view/chat-scroll-view.vue +++ b/src/components/chat-scroll-view/chat-scroll-view.vue @@ -69,7 +69,7 @@