开放平台
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

information.vue 4.3 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. <template>
  2. <div>
  3. <div class="bulletin-box">
  4. <div class="bulletin-left">公告</div>
  5. <div
  6. v-swiper:mySwiper="swiperOption"
  7. class="swiperWrap"
  8. style="height: 32px"
  9. >
  10. <div class="swiper-wrapper">
  11. <div
  12. class="swiper-slide"
  13. v-for="(banner, index) in banners"
  14. :key="index"
  15. >
  16. {{ banner.content }}
  17. </div>
  18. </div>
  19. </div>
  20. </div>
  21. <div class="information-box">
  22. <div class="information-head">
  23. <span>账号信息</span>
  24. </div>
  25. <div>
  26. <el-form label-position="top" inline :model="formLabelAlign">
  27. <div class="form-Text">
  28. <el-form-item label="账号名称">
  29. <el-input v-model="formLabelAlign.name"></el-input>
  30. </el-form-item>
  31. <el-form-item label="绑定邮箱">
  32. <el-input v-model="formLabelAlign.mail"></el-input>
  33. </el-form-item>
  34. <el-form-item label="绑定手机">
  35. <el-input v-model="formLabelAlign.phone"></el-input>
  36. </el-form-item>
  37. <el-form-item label="QQ账号">
  38. <el-input v-model="formLabelAlign.qq"></el-input>
  39. </el-form-item>
  40. </div>
  41. <div class="avatar-uploader-box">
  42. <el-form-item label="头像">
  43. <el-upload
  44. class="avatar-uploader"
  45. action="https://jsonplaceholder.typicode.com/posts/"
  46. :show-file-list="false"
  47. :on-success="handleAvatarSuccess"
  48. :before-upload="beforeAvatarUpload"
  49. >
  50. <span class="pencil-box">
  51. <i class="iconfont MinIconicon-pencil"></i>
  52. </span>
  53. <img
  54. src="https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3796860614,110950961&fm=26&gp=0.jpg"
  55. class="avatar"
  56. />
  57. </el-upload>
  58. </el-form-item>
  59. </div>
  60. <el-button class="primary-button" type="primary" @click="onSubmit"
  61. >保存修改</el-button
  62. >
  63. </el-form>
  64. </div>
  65. </div>
  66. </div>
  67. </template>
  68. <script>
  69. export default {
  70. meta:{ title:'账号信息'},
  71. data() {
  72. return {
  73. formLabelAlign: {
  74. name: "",
  75. phone: "",
  76. mail: "",
  77. qq: "",
  78. },
  79. banners: [
  80. {
  81. content:
  82. "您目前还没完成实名认证,部分功能不可使用,请尽快进行实名认证1",
  83. },
  84. {
  85. content:
  86. "您目前还没完成实名认证,部分功能不可使用,请尽快进行实名认证2",
  87. },
  88. {
  89. content:
  90. "您目前还没完成实名认证,部分功能不可使用,请尽快进行实名认证3",
  91. },
  92. {
  93. content:
  94. "您目前还没完成实名认证,部分功能不可使用,请尽快进行实名认证4",
  95. },
  96. ],
  97. swiperOption: {
  98. direction: "vertical",
  99. autoplay: true,
  100. loop: true,
  101. },
  102. };
  103. },
  104. methods: {
  105. handleAvatarSuccess: function () {},
  106. beforeAvatarUpload: function () {},
  107. onSubmit: function () {},
  108. },
  109. };
  110. </script>
  111. <style lang="scss" scoped>
  112. .information-box {
  113. padding: 20px;
  114. background: #fff;
  115. border-radius: 14px;
  116. }
  117. .information-head {
  118. height: 26px;
  119. font-size: 20px;
  120. color: #333333;
  121. display: flex;
  122. align-items: center;
  123. margin-bottom: 35px;
  124. span {
  125. height: 20px;
  126. line-height: 20px;
  127. padding-left: 20px;
  128. border-left: 4px solid #1890ff;
  129. }
  130. }
  131. .avatar-uploader-box {
  132. float: left;
  133. margin-left: 7px;
  134. position: relative;
  135. .el-form-item {
  136. width: 100% !important;
  137. text-align: center;
  138. }
  139. }
  140. .el-form--inline .el-form-item {
  141. width: 48%;
  142. color: #5f6279;
  143. font-size: 14px;
  144. }
  145. .form-Text {
  146. float: left;
  147. width: calc(100% - 170px);
  148. }
  149. .avatar {
  150. width: 150px;
  151. height: 150px;
  152. border-radius: 50%;
  153. }
  154. .pencil-box {
  155. position: absolute;
  156. width: 32px;
  157. height: 32px;
  158. background: #1890ff;
  159. color: #fff;
  160. font-size: 24px;
  161. border-radius: 50%;
  162. display: flex;
  163. justify-content: center;
  164. align-items: center;
  165. bottom: 16px;
  166. right: 16px;
  167. }
  168. .primary-button {
  169. margin: 0 auto;
  170. width: 96px;
  171. }
  172. </style>