Browse Source

热门展览-博物馆名称:太长时显示省略号

任一存 2 years ago
parent
commit
b8de18ebb5
2 changed files with 5 additions and 1 deletions
  1. 1 0
      code/src/config/http.js
  2. 4 1
      code/src/views/exhibition/index.vue

+ 1 - 0
code/src/config/http.js

@@ -4,6 +4,7 @@ import { Loading } from "@/components/UI";
 
 
 var isProduction = process.env.NODE_ENV === "production";
 var isProduction = process.env.NODE_ENV === "production";
 
 
+// const serverName = isProduction ? "/api/" : "http://192.168.20.55:8035/api/";
 const serverName = isProduction ? "/api/" : "http://gdbwg.4dage.com/api/";
 const serverName = isProduction ? "/api/" : "http://gdbwg.4dage.com/api/";
 
 
 const serverLocation = window.location.hostname;
 const serverLocation = window.location.hostname;

+ 4 - 1
code/src/views/exhibition/index.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <div class="gdmuseum">
   <div class="gdmuseum">
     <div class="info" v-if="currentMuseum">
     <div class="info" v-if="currentMuseum">
-      <div>{{currentMuseum.name}}</div>
+      <div :title="currentMuseum.name">{{currentMuseum.name}}</div>
       <p>
       <p>
         {{currentMuseum.description || '暂无简介'}}
         {{currentMuseum.description || '暂无简介'}}
       </p>
       </p>
@@ -87,6 +87,9 @@ let updateMuseum = (data)=>{
       font-size: 30px;
       font-size: 30px;
       font-weight: bold;
       font-weight: bold;
       color: var(--main-color);
       color: var(--main-color);
+      overflow: hidden;
+      white-space: nowrap;
+      text-overflow: ellipsis;
     }
     }
     > p {
     > p {
       width: 50%;
       width: 50%;