uni-app个人信息页面
时间: 2023-09-16 16:15:21 浏览: 542
对于个人信息页面,你可以使用uni-app进行开发。以下是一个简单的示例代码,展示了一个基本的个人信息页面的结构:
```vue
<template>
<view class="container">
<image class="avatar" :src="userInfo.avatar" mode="aspectFill"></image>
<view class="info">
<view class="username">{{ userInfo.username }}</view>
<view class="email">{{ userInfo.email }}</view>
<view class="phone">{{ userInfo.phone }}</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
userInfo: {
avatar: '路径/到/头像图片',
username: '用户名',
email: '邮箱',
phone: '电话号码'
}
};
}
};
</script>
<style>
.container {
display: flex;
align-items: center;
}
.avatar {
width: 100px;
height: 100px;
border-radius: 50%;
}
.info {
margin-left: 20px;
}
.username {
font-size: 20px;
font-weight: bold;
}
.email,
.phone {
color: #999;
}
</style>
```
在上面的代码中,我们使用了`<template>`标签定义了页面的结构,`<script>`标签定义了页面的逻辑,`<style>`标签定义了样式。
你可以根据需要修改示例代码中的`userInfo`数据,以展示实际的个人信息。同时,你还可以根据需要添加更多的样式和功能来丰富个人信息页面。
阅读全文
相关推荐

















