guhongwei 5 лет назад
Родитель
Сommit
23e048baa8
3 измененных файлов с 21 добавлено и 6 удалено
  1. BIN
      src/assets/logo.png
  2. 1 0
      src/layout/detail/content.vue
  3. 20 6
      src/layout/index/native.vue

BIN
src/assets/logo.png


+ 1 - 0
src/layout/detail/content.vue

@@ -79,5 +79,6 @@ export default {
   color: #333;
   text-indent: 2rem;
   line-height: 40px;
+  padding: 0 30px;
 }
 </style>

+ 20 - 6
src/layout/index/native.vue

@@ -12,17 +12,30 @@
             <template v-for="(sub, subIndex) in item.children">
               <template v-if="sub.children">
                 <template v-for="(thr) in sub.children">
-                  <el-menu-item :index="thr.path" :key="thr.id" v-if="thr.type !== 'url'" style="float: left;height:60px;line-height:60px;font-size:20px;" class="hover">{{ thr.title }}</el-menu-item>
-                  <el-menu-item :index="``" :key="thr.id" @click="turnTo(thr.url)" v-else style="float: left;height:60px;line-height:60px;font-size:20px;" class="hover"> {{ thr.title }}</el-menu-item>
+                  <el-menu-item :index="thr.path" :key="thr.id" v-if="thr.type !== 'url'"
+                                style="float: left;height:60px;line-height:60px;font-size:20px;" class="hover">
+                    {{ thr.title }}</el-menu-item>
+                  <el-menu-item :index="``" :key="thr.id" @click="turnTo(thr.url)" v-else
+                                style="float: left;height:60px;line-height:60px;font-size:20px;" class="hover">
+                    {{ thr.title }}</el-menu-item>
                 </template>
               </template>
-              <el-menu-item :index="sub.path" :key="subIndex+'sub'" v-else-if="sub.type === 'content'||sub.type==='column'" style="float: left;height:60px;line-height:60px;font-size:20px;" class="hover">{{ sub.title }}</el-menu-item>
-              <el-menu-item :index="`${index}-${subIndex}`" :key="subIndex+'sub'" @click="turnTo(sub.url)" v-else style="float: left;height:60px;line-height:60px;font-size:20px;" class="hover"> {{ sub.title }}</el-menu-item>
+              <el-menu-item :index="sub.path" :key="subIndex+'sub'"
+                            v-else-if="sub.type === 'content'||sub.type==='column'"
+                            style="float: left;height:60px;line-height:60px;font-size:20px;" class="hover">
+                {{ sub.title }}</el-menu-item>
+              <el-menu-item :index="`${index}-${subIndex}`" :key="subIndex+'sub'" @click="turnTo(sub.url)" v-else
+                            style="float: left;height:60px;line-height:60px;font-size:20px;" class="hover">
+                {{ sub.title }}</el-menu-item>
             </template>
           </el-submenu>
           <!-- 一级栏目非常规栏目情况 -->
-          <el-menu-item v-else-if="item.type === 'content'" :index="item.path" :key="index" style="float: left;height:60px;line-height:60px;font-size:20px;" class="hover">{{ item.title }}</el-menu-item>
-          <el-menu-item v-else :index="``" :key="index" @click="turnTo(item.url)" style="float: left;height:60px;line-height:60px;font-size:20px;" class="hover">{{ item.title }}</el-menu-item>
+          <el-menu-item v-else-if="item.type === 'content'" :index="item.path" :key="index"
+                        style="float: left;height:60px;line-height:60px;font-size:20px;" class="hover">{{ item.title }}
+          </el-menu-item>
+          <el-menu-item v-else :index="``" :key="index" @click="turnTo(item.url)"
+                        style="float: left;height:60px;line-height:60px;font-size:20px;" class="hover">{{ item.title }}
+          </el-menu-item>
           <!-- 输出一级栏目结束↑ -->
         </template>
       </el-menu>
@@ -61,6 +74,7 @@ export default {
 }
 /deep/.el-submenu__title {
   font-size: 20px;
+  padding: 0 50px;
 }
 /deep/.el-submenu__title:hover {
   background-color: #215299 !important;