Ver código fonte

dev question

allen 2 anos atrás
pai
commit
5b04bee24b
2 arquivos alterados com 14 adições e 8 exclusões
  1. 6 1
      src/router/search/index.js
  2. 8 7
      src/views/searchV2/question/index.vue

+ 6 - 1
src/router/search/index.js

@@ -7,7 +7,12 @@ export default  [
     name: 'search',
     component: Home,
     meta: { title: '检索中心', icon: 'dashboard', activeMenu: '' }
-  }
+  },
+  {
+    path: '/question',
+    component: () => import('@/views/searchV2/question'),
+    hidden: true
+  },
   // {
   //     path: '/search/nav',
   //     name: 'nav',

+ 8 - 7
src/views/searchV2/question/index.vue

@@ -3,11 +3,10 @@
       <el-row>
         <el-col :span="6">
           <el-card class="chat-msg">
-            <ul>
-              <li v-for="item in top10" :key="item.question" @click="searchByTop10(item.question)">
-                {{ item.question }}
-              </li>
-            </ul>
+            <p>热点问题</p>
+            <p v-for="(item,index) in top10" :key="item.question" @click="searchByTop10(item.question)">
+                {{ index+1+'. '+item.question }}
+              </p>
           </el-card>
         </el-col>
         <el-col :span="12">
@@ -249,11 +248,12 @@ export default {
 
 .chat-window-wrapper {
   border: 2px solid #45a1ff;
-  height: calc(100vh - 200px);
+  height: calc(100vh - 100px);
   /* max-height: 500px; */
   overflow-y: auto;
   margin-left: 5px;
   margin-right: 5px;
+  margin-top: 20px;
 }
 
 .chat-window {
@@ -261,8 +261,9 @@ export default {
   /* min-height: 100%; */
 }
 .chat-msg {
-  height: calc(100vh - 200px);
+  height: calc(100vh - 40px);
   white-space: pre-wrap;
   font-size: 1rem;
+  margin-top: 20px;
 }
 </style>