请写一段基于vue3的个人信息页面
时间: 2023-06-02 13:06:44 浏览: 140
当然,我很乐意为您编写基于Vue3的个人信息页面!以下是一段示例代码,您可以按照您的需求进行修改和定制。
```
<template>
<div class="profile">
<h2>{{ name }}</h2>
<img :src="avatar" alt="Profile Picture">
<p>{{ bio }}</p>
<div class="contact">
<p>
<i class="fas fa-envelope"></i> Email: {{ email }}
</p>
<p>
<i class="fas fa-phone"></i> Phone: {{ phone }}
</p>
<p>
<i class="fas fa-map-marker-alt"></i> Location: {{ location }}
</p>
</div>
</template>
<script>
export default {
name: "Profile",
data() {
return {
name: "John Smith",
avatar: "https://via.placeholder.com/150",
bio: "I am a passionate developer who loves building software solutions that solve real-world problems.",
email: "johnsmith@example.com",
phone: "+1 (123) 456-7890",
location: "New York, NY",
};
},
};
</script>
<style scoped>
.profile {
text-align: center;
margin-top: 50px;
}
h2 {
font-weight: bold;
font-size: 36px;
margin-bottom: 10px;
}
img {
width: 150px;
height: 150px;
border-radius: 50%;
margin-bottom: 20px;
}
p {
font-size: 18px;
margin-bottom: 10px;
}
.contact {
margin-top: 50px;
border-top: 2px solid #ccc;
padding-top: 20px;
}
</style>
```
阅读全文