Browse Source

个人信息图片样式

da_ji 2 years ago
parent
commit
85f3ac58d7
1 changed files with 23 additions and 15 deletions
  1. 23 15
      src/views/middle.vue

+ 23 - 15
src/views/middle.vue

@@ -5,7 +5,11 @@
       <header>
         <div class="width_1200">
           <div class="header_container">
-            <p>您好,{{ dmUser.user.nickName }}&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;</p>
+            <p>
+              您好,{{
+                dmUser.user.nickName
+              }}&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;
+            </p>
             <p>
               {{
                 dmUser.user.dept.name
@@ -25,14 +29,16 @@
         <div class="demo-basic--circle">
           <div
             class="block"
-            :style="{'background':'url('+dmUser.user.dmUser.faceid+')','background-size': 'contain',
-                     'background-repeat': 'no-repeat',
-                     'background-position': 'center',
-                     'border': '1px solid #ebebeb',
-                     'background-color': '#f1f1f1'}"
+            :style="{
+              'background-image': 'url(' + dmUser.user.dmUser.faceid + ')',
+              'background-size': 'contain',
+              'background-position': 'center',
+              border: '1px solid #ebebeb',
+              'background-color': '#f1f1f1',
+            }"
+            style="background-repeat: no-repeat"
           >
             <!--            <img :src="dmUser.user.dmUser.faceid" alt="">-->
-
           </div>
           <div class="userInfo">
             <div class="name">
@@ -293,7 +299,7 @@ export default {
       axios
         .get(
           'https://smartpark.caih.com/dxapi/dxtop/staff/cardBalance?card=' +
-          card
+            card
         )
         .then((res) => {
           this.balance = res.data.data
@@ -416,11 +422,11 @@ export default {
   padding: 0;
 }
 
-> > > .el-col:nth-child(5n + 1) {
+> .el-col:nth-child(5n + 1) {
   margin-left: 0;
 }
 
-> > > .el-col:nth-child(n + 6) {
+> .el-col:nth-child(n + 6) {
   margin-top: 1;
 }
 
@@ -485,11 +491,13 @@ export default {
       box-sizing: border-box;
 
       .block {
+        width: 120px;
+        height: 160px;
         margin-right: 30px;
-        background-size: contain;
-        background-repeat: no-repeat;
-        background-position: center;
-        border: 1px solid #ebebeb;
+        // background-size: contain;
+        // background-repeat: no-repeat;
+        // background-position: center;
+        // border: 1px solid #ebebeb;
         background-color: #f1f1f1;
         img {
           width: 120px;
@@ -813,7 +821,7 @@ export default {
   clear: both;
 }
 
-> > > .el-card__header {
+> .el-card__header {
   padding: 15px 15px 10px;
 }
 </style>