Explorar el Código

fix: 注册页面头像上传后正常回显

Developer hace 4 días
padre
commit
b9b48c77b1
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      components/pages/loginRegister/index.vue

+ 5 - 0
components/pages/loginRegister/index.vue

@@ -240,6 +240,11 @@
 
 	const onChooseAvatar = e => {
 		register.value.avatarPath = e.detail.avatarUrl;
+		// 更新 fileList 以显示头像
+		fileList.value = [{
+			url: e.detail.avatarUrl,
+			status: 'success'
+		}];
 	}
 
 	const getPhone = code => {