浏览代码

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

Developer 4 天之前
父节点
当前提交
b9b48c77b1
共有 1 个文件被更改,包括 5 次插入0 次删除
  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 => {