Jelajahi Sumber

详情标题展示

yuany 3 tahun lalu
induk
melakukan
ec608eb299
1 mengubah file dengan 23 tambahan dan 4 penghapusan
  1. 23 4
      src/views/asset/Detail.vue

+ 23 - 4
src/views/asset/Detail.vue

@@ -61,7 +61,7 @@
                 <div class="list_of_details_one_title">
                 <div class="list_of_details_one_title">
                         <img :src="require('@assets/zuo@3x.png')" alt="" class="list_of_details_one_title_img" />
                         <img :src="require('@assets/zuo@3x.png')" alt="" class="list_of_details_one_title_img" />
                         <div>
                         <div>
-                            <div class="list_of_details_one_title_con">{{ info.name }}</div>
+                            <div :class="infoNameLength?'list_of_details_one_title_cons':'list_of_details_one_title_con'">{{ info.name }}</div>
                             <div class="list_of_details_one_text" v-if="!info.consignment">
                             <div class="list_of_details_one_text" v-if="!info.consignment">
                                 <img
                                 <img
                                     :src="require('@assets/blockchain@3x.png')"
                                     :src="require('@assets/blockchain@3x.png')"
@@ -450,7 +450,7 @@
                 <div class="list_of_details_one_title">
                 <div class="list_of_details_one_title">
                         <img :src="require('@assets/zuo@3x.png')" alt="" class="list_of_details_one_title_img" />
                         <img :src="require('@assets/zuo@3x.png')" alt="" class="list_of_details_one_title_img" />
                         <div>
                         <div>
-                            <div class="list_of_details_one_title_con">{{ info.name }}</div>
+                            <div :class="infoNameLength?'list_of_details_one_title_cons':'list_of_details_one_title_con'">{{ info.name }}</div>
                             <div class="list_of_details_one_text">
                             <div class="list_of_details_one_text">
                                 <img
                                 <img
                                     :src="require('@assets/blockchain@3x.png')"
                                     :src="require('@assets/blockchain@3x.png')"
@@ -842,7 +842,8 @@ export default {
             giftCollection: false,
             giftCollection: false,
             giftSuccess: require('@assets/zengsongchenggong@3x.png'),
             giftSuccess: require('@assets/zengsongchenggong@3x.png'),
             giftFailed: require('@assets/zengsongshibai@3x.png'),
             giftFailed: require('@assets/zengsongshibai@3x.png'),
-            collectionStatus: ''
+            collectionStatus: '',
+            infoNameLength: false
         };
         };
     },
     },
     computed: {
     computed: {
@@ -1148,7 +1149,11 @@ export default {
                         return item.name !== '悄悄话';
                         return item.name !== '悄悄话';
                     });
                     });
                 }
                 }
-
+                if (this.info.name.length > 14) {
+                        this.infoNameLength = true;
+                    } else {
+                        this.infoNameLength = false;
+                    }
                 this.$nextTick(() => {
                 this.$nextTick(() => {
                     if (this.isBuy) {
                     if (this.isBuy) {
                         this.btn = this.$refs.btn;
                         this.btn = this.$refs.btn;
@@ -1296,6 +1301,20 @@ export default {
                     color: #ffffff;
                     color: #ffffff;
                     line-height: 28px;
                     line-height: 28px;
                 }
                 }
+                .list_of_details_one_title_cons {
+                    width: 100%;
+                    white-space: nowrap;
+                    overflow: hidden;
+                    text-overflow: ellipsis;
+                    text-align: center;
+                    margin-bottom: 4px;
+                    height: 28px;
+                    font-size: 16px;
+                    font-family: PingFangSC-Semibold, PingFang SC;
+                    font-weight: 600;
+                    color: #ffffff;
+                    line-height: 28px;
+                }
                 .list_of_details_one_text {
                 .list_of_details_one_text {
                     display: flex;
                     display: flex;
                     justify-content: center;
                     justify-content: center;