mirror of
				https://github.com/pure-admin/vue-pure-admin.git
				synced 2025-11-03 13:44:47 +08:00 
			
		
		
		
	perf: notice消息提示组件空数据时添加el-empty组件
				
					
				
			This commit is contained in:
		
							parent
							
								
									88a44f29d0
								
							
						
					
					
						commit
						da6c2628d5
					
				@ -22,19 +22,31 @@ notices.value.map(v => (noticesNum.value += v.list.length));
 | 
				
			|||||||
    </span>
 | 
					    </span>
 | 
				
			||||||
    <template #dropdown>
 | 
					    <template #dropdown>
 | 
				
			||||||
      <el-dropdown-menu>
 | 
					      <el-dropdown-menu>
 | 
				
			||||||
        <el-tabs :stretch="true" v-model="activeKey" class="dropdown-tabs">
 | 
					        <el-tabs
 | 
				
			||||||
          <template v-for="item in notices" :key="item.key">
 | 
					          :stretch="true"
 | 
				
			||||||
            <el-tab-pane
 | 
					          v-model="activeKey"
 | 
				
			||||||
              :label="`${item.name}(${item.list.length})`"
 | 
					          class="dropdown-tabs"
 | 
				
			||||||
              :name="`${item.key}`"
 | 
					          :style="{ width: notices.length === 0 ? '200px' : '330px' }"
 | 
				
			||||||
            >
 | 
					        >
 | 
				
			||||||
              <el-scrollbar max-height="330px">
 | 
					          <el-empty
 | 
				
			||||||
                <div class="noticeList-container">
 | 
					            v-if="notices.length === 0"
 | 
				
			||||||
                  <NoticeList :list="item.list" />
 | 
					            description="暂无消息"
 | 
				
			||||||
                </div>
 | 
					            :image-size="60"
 | 
				
			||||||
              </el-scrollbar>
 | 
					          />
 | 
				
			||||||
            </el-tab-pane>
 | 
					          <span v-else>
 | 
				
			||||||
          </template>
 | 
					            <template v-for="item in notices" :key="item.key">
 | 
				
			||||||
 | 
					              <el-tab-pane
 | 
				
			||||||
 | 
					                :label="`${item.name}(${item.list.length})`"
 | 
				
			||||||
 | 
					                :name="`${item.key}`"
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
 | 
					                <el-scrollbar max-height="330px">
 | 
				
			||||||
 | 
					                  <div class="noticeList-container">
 | 
				
			||||||
 | 
					                    <NoticeList :list="item.list" />
 | 
				
			||||||
 | 
					                  </div>
 | 
				
			||||||
 | 
					                </el-scrollbar>
 | 
				
			||||||
 | 
					              </el-tab-pane>
 | 
				
			||||||
 | 
					            </template>
 | 
				
			||||||
 | 
					          </span>
 | 
				
			||||||
        </el-tabs>
 | 
					        </el-tabs>
 | 
				
			||||||
      </el-dropdown-menu>
 | 
					      </el-dropdown-menu>
 | 
				
			||||||
    </template>
 | 
					    </template>
 | 
				
			||||||
@ -57,8 +69,6 @@ notices.value.map(v => (noticesNum.value += v.list.length));
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.dropdown-tabs {
 | 
					.dropdown-tabs {
 | 
				
			||||||
  width: 330px;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  .noticeList-container {
 | 
					  .noticeList-container {
 | 
				
			||||||
    padding: 15px 24px 0;
 | 
					    padding: 15px 24px 0;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user