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 = () => {