From 1d198e43927387eb7667ac2f691618f669d601de Mon Sep 17 00:00:00 2001 From: 杨磊 <505174330@qq.com> Date: 星期三, 14 五月 2025 17:29:44 +0800 Subject: [PATCH] 首页加载状态 --- src/views/home/index.vue | 27 ++++++++++++++++++++++++--- 1 files changed, 24 insertions(+), 3 deletions(-) diff --git a/src/views/home/index.vue b/src/views/home/index.vue index c8c53d7..c9a5c9a 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -10,8 +10,14 @@ <SearchBox @search="handleSearch" /> </div> </div> - <div class="menuBox"> - <div class="menuList" v-show="startYear != ''"> + <div + class="menuBox" + v-loading="loading" + element-loading-text="鍔犺浇涓�" + element-loading-spinner="el-icon-loading" + element-loading-background="rgba(0, 0, 0, 0)" + > + <div class="menuList" v-show="!loading"> <div class="menu" v-for="item in menuList" @@ -69,6 +75,7 @@ data() { return { arrow, + loading: false, resourceList: [ "journal", "books", @@ -154,6 +161,7 @@ .then((res) => { console.log(res, "res1111111"); this.studentNum = res.total; + this.loading = false; }); }, @@ -210,6 +218,7 @@ }, getListData() { + this.loading = true; this.MG.resource .getItem({ path: "WYY_chronology", @@ -260,7 +269,7 @@ }; </script> -<style> +<style lang="less" scoped> .home { width: 100%; height: 100vh; @@ -392,6 +401,18 @@ text-align: center; } +::v-deep .el-loading-spinner { + .el-loading-text { + font-size: 14px; + color: #937950; + } + + .el-icon-loading { + font-size: 14px; + color: #937950; + } +} + /* @media screen and (min-width: 1950px) { .textInfo { font-size: 20px; -- Gitblit v1.9.1