|
- <template>
- <div>
- <div class="bulletin-box">
- <div class="bulletin-left">公告</div>
- <div
- v-swiper:mySwiper="swiperOption"
- class="swiperWrap"
- style="height: 32px"
- >
- <div class="swiper-wrapper">
- <div
- class="swiper-slide"
- v-for="(banner, index) in banners"
- :key="index"
- >
- {{ banner.content }}
- </div>
- </div>
- </div>
- </div>
-
- <div class="information-box">
- <div class="information-head">
- <span>账号信息</span>
- </div>
- <div>
- <el-form label-position="top" inline :model="formLabelAlign">
- <div class="form-Text">
- <el-form-item label="账号名称">
- <el-input v-model="formLabelAlign.name"></el-input>
- </el-form-item>
- <el-form-item label="绑定邮箱">
- <el-input v-model="formLabelAlign.mail"></el-input>
- </el-form-item>
-
- <el-form-item label="绑定手机">
- <el-input v-model="formLabelAlign.phone"></el-input>
- </el-form-item>
- <el-form-item label="QQ账号">
- <el-input v-model="formLabelAlign.qq"></el-input>
- </el-form-item>
- </div>
- <div class="avatar-uploader-box">
- <el-form-item label="头像">
- <el-upload
- class="avatar-uploader"
- action="https://jsonplaceholder.typicode.com/posts/"
- :show-file-list="false"
- :on-success="handleAvatarSuccess"
- :before-upload="beforeAvatarUpload"
- >
- <span class="pencil-box">
- <i class="iconfont MinIconicon-pencil"></i>
- </span>
-
- <img
- src="https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3796860614,110950961&fm=26&gp=0.jpg"
- class="avatar"
- />
- </el-upload>
- </el-form-item>
- </div>
- <el-button class="primary-button" type="primary" @click="onSubmit"
- >保存修改</el-button
- >
- </el-form>
- </div>
- </div>
- </div>
- </template>
-
-
- <script>
- export default {
- meta:{ title:'账号信息'},
- data() {
- return {
- formLabelAlign: {
- name: "",
- phone: "",
- mail: "",
- qq: "",
- },
- banners: [
- {
- content:
- "您目前还没完成实名认证,部分功能不可使用,请尽快进行实名认证1",
- },
- {
- content:
- "您目前还没完成实名认证,部分功能不可使用,请尽快进行实名认证2",
- },
- {
- content:
- "您目前还没完成实名认证,部分功能不可使用,请尽快进行实名认证3",
- },
- {
- content:
- "您目前还没完成实名认证,部分功能不可使用,请尽快进行实名认证4",
- },
- ],
- swiperOption: {
- direction: "vertical",
- autoplay: true,
- loop: true,
- },
- };
- },
- methods: {
- handleAvatarSuccess: function () {},
- beforeAvatarUpload: function () {},
- onSubmit: function () {},
- },
- };
- </script>
-
- <style lang="scss" scoped>
-
-
- .information-box {
- padding: 20px;
- background: #fff;
- border-radius: 14px;
- }
-
- .information-head {
- height: 26px;
- font-size: 20px;
- color: #333333;
- display: flex;
- align-items: center;
- margin-bottom: 35px;
- span {
- height: 20px;
- line-height: 20px;
- padding-left: 20px;
- border-left: 4px solid #1890ff;
- }
- }
- .avatar-uploader-box {
- float: left;
- margin-left: 7px;
- position: relative;
- .el-form-item {
- width: 100% !important;
- text-align: center;
- }
- }
-
- .el-form--inline .el-form-item {
- width: 48%;
- color: #5f6279;
- font-size: 14px;
- }
-
- .form-Text {
- float: left;
- width: calc(100% - 170px);
- }
-
- .avatar {
- width: 150px;
- height: 150px;
- border-radius: 50%;
- }
-
- .pencil-box {
- position: absolute;
- width: 32px;
- height: 32px;
- background: #1890ff;
- color: #fff;
- font-size: 24px;
- border-radius: 50%;
- display: flex;
- justify-content: center;
- align-items: center;
- bottom: 16px;
- right: 16px;
- }
-
- .primary-button {
- margin: 0 auto;
- width: 96px;
- }
- </style>
|