From 24bf19791afe8a13fbc79affa55eb47738a5f583 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Thu, 29 Feb 2024 15:41:09 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=A7=BB=E5=8A=A8=E7=AB=AF):=20=E6=9A=82?= =?UTF-8?q?=E6=97=A0=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/mobile/home/index.vue | 40 +++++++++++++++++++ .../src/views/mobile/panel/Mobile.vue | 13 +++--- 2 files changed, 47 insertions(+), 6 deletions(-) diff --git a/core/core-frontend/src/views/mobile/home/index.vue b/core/core-frontend/src/views/mobile/home/index.vue index c4d3b6aa7b..bbe989e7ca 100644 --- a/core/core-frontend/src/views/mobile/home/index.vue +++ b/core/core-frontend/src/views/mobile/home/index.vue @@ -6,6 +6,7 @@ import { shortcutOption } from '@/views/workbranch/ShortcutOption' import { useRouter } from 'vue-router' import Workbranch from '@/views/mobile/components/Workbranch.vue' import request from '@/config/axios' +import nothingNone from '@/assets/img/none.png' import VanTabs from 'vant/es/tabs' import VanNavBar from 'vant/es/nav-bar' import VanTab from 'vant/es/tab' @@ -19,6 +20,7 @@ const router = useRouter() const { t } = useI18n() const activeTab = ref('recent') +const emptyTips = ref('') const state = reactive({ tableData: [], curTypeList: [] @@ -35,9 +37,22 @@ const loadTableData = () => { }) .finally(() => { emits('setLoading', false) + setEmptyTips() }) } +const setEmptyTips = () => { + emptyTips.value = state.tableData.length + ? '' + : `暂无${ + { + recent: '数据', + store: '收藏', + share: '分享' + }[activeTab.value] + }` +} + const loadShareTableData = () => { emits('setLoading', true) request @@ -50,6 +65,7 @@ const loadShareTableData = () => { }) .finally(() => { emits('setLoading', false) + setEmptyTips() }) } @@ -133,6 +149,12 @@ const formatterTime = val => { :time="formatterTime(ele.lastEditTime || ele.time)" /> +
+ +
+ {{ emptyTips }} +
+
@@ -145,5 +167,23 @@ const formatterTime = val => { height: calc(100vh - 142px); margin-top: 8px; } + + .empty-img-mobile { + position: absolute; + top: 33%; + left: 0; + width: 100%; + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; + font-size: 14px; + font-weight: 400; + line-height: 22px; + + img { + margin-bottom: 8px; + } + } } diff --git a/core/core-frontend/src/views/mobile/panel/Mobile.vue b/core/core-frontend/src/views/mobile/panel/Mobile.vue index 6b1f5407fb..351907078b 100644 --- a/core/core-frontend/src/views/mobile/panel/Mobile.vue +++ b/core/core-frontend/src/views/mobile/panel/Mobile.vue @@ -67,12 +67,7 @@ const onClickLeft = () => {