瀏覽代碼

修改,添加暂无数据提示

lrf402788946 5 年之前
父節點
當前提交
02042be52c
共有 3 個文件被更改,包括 18 次插入6 次删除
  1. 8 2
      src/layout/index/cause.vue
  2. 8 2
      src/layout/index/danwei.vue
  3. 2 2
      src/layout/noDate.vue

+ 8 - 2
src/layout/index/cause.vue

@@ -1,7 +1,7 @@
 <template>
   <div id="cause">
     <el-row>
-      <el-col :span="24">
+      <el-col :span="24" v-if="enterList && enterList.length > 0">
         <el-tabs v-model="activeName" type="border-card" :before-leave="handleClick">
           <el-tab-pane v-for="(item, index) in enterList" :key="index">
             <span slot="label">{{ item.title }}</span>
@@ -17,17 +17,23 @@
         </el-tabs>
         <el-link :inderline="false" class="moreLink" :style="`color:${Color}`" @click="moreClick()">MORE<i class="el-icon-video-play"></i> </el-link>
       </el-col>
+      <el-col :span="24" v-else>
+        <no-data></no-data>
+      </el-col>
     </el-row>
   </div>
 </template>
 
 <script>
+import noData from '@publics/src/layout/noData.vue';
 export default {
   name: 'cause',
   props: {
     enterList: null,
   },
-  components: {},
+  components: {
+    noData,
+  },
   data: () => ({
     activeName: '',
     Color: '#850000',

+ 8 - 2
src/layout/index/danwei.vue

@@ -1,7 +1,7 @@
 <template>
   <div id="danwei">
     <el-row>
-      <el-col :span="24">
+      <el-col :span="24" v-if="enterList && enterList.length > 0">
         <el-tabs v-model="activeName" type="border-card" :before-leave="handleClick">
           <el-tab-pane v-for="(item, index) in danweiList" :key="index">
             <span slot="label">{{ item.title }}</span>
@@ -17,17 +17,23 @@
         </el-tabs>
         <el-link :inderline="false" class="moreLink" :style="`color:${Color}`" @click="moreClick()">MORE<i class="el-icon-video-play"></i> </el-link>
       </el-col>
+      <el-col :span="24" v-else>
+        <no-data></no-data>
+      </el-col>
     </el-row>
   </div>
 </template>
 
 <script>
+import noData from '@publics/src/layout/noData.vue';
 export default {
   name: 'danwei',
   props: {
     danweiList: null,
   },
-  components: {},
+  components: {
+    noData,
+  },
   data: () => ({
     activeName: '',
     Color: '#850000',

+ 2 - 2
src/layout/noDate.vue

@@ -1,5 +1,5 @@
 <template>
-  <div id="noDate">
+  <div id="noData">
     <el-row>
       <el-col1 :span="24" class="info">
         <P>暂无数据,敬请期待</P>
@@ -10,7 +10,7 @@
 
 <script>
 export default {
-  name: 'noDate',
+  name: 'noData',
   props: {},
   components: {},
   data: () => ({}),