Filed 无法展示值
Author: mynameiscuiningCreated Sep 12, 2026Updated Sep 12, 2026
Labelsbug: need confirm
重现链接
Filed组件 初始化数据不展示,确定是有值的 ,代码如下: 个人资料 编辑资料 更新昵称和头像,保存后立即同步到个人中心。
<view class="profile-edit-body">
<view class="profile-edit-avatar-section">
<text class="profile-edit-section-label">头像</text>
<view class="profile-edit-avatar-action service-tap" @click="chooseAvatar">
<view class="profile-edit-avatar">
<image v-if="avatarUrl" class="profile-edit-avatar-image" :src="avatarUrl" mode="aspectFill"/>
<van-icon v-else name="user-circle-o" size="84rpx" color="#002fa7"/>
</view>
<view class="profile-edit-avatar-copy">
<text class="profile-edit-avatar-title">更换头像</text>
<text class="profile-edit-avatar-hint">选择一张图片作为个人头像</text>
</view>
<van-icon name="arrow" size="30rpx" color="#68738a"/>
</view>
<text v-if="uploading" class="profile-edit-status">头像上传中...</text>
</view>
<view class="profile-edit-field-section">
<text class="profile-edit-section-label">昵称</text>
<van-field
:model-value="nickname"
class="profile-edit-field"
placeholder="请输入昵称"
clearable
maxlength="30"
@change="handleNicknameChange"
/>
</view>
<view class="profile-edit-actions">
<van-button
type="primary"
block
:loading="saving"
:disabled="uploading"
@click="saveProfile"
>保存资料
</van-button>
</view>
</view>
Vant Weapp 版本
1.11.7
描述一下你遇到的问题。
使用uiapp 开发 在编辑页onLoad 初始化数据 初始化的昵称无法展示,头像可以展示
重现步骤
如上描述
设备/浏览器
微信开发者公司
Source: youzan/vant-weapp