From 2de5143f1e5bfe5dfc3a7a0185f82fe5d1c40cb4 Mon Sep 17 00:00:00 2001 From: bob bob <2529156631@qq.com> Date: Wed, 30 Oct 2024 15:15:44 +0000 Subject: [PATCH] =?UTF-8?q?uniapp=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91:?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=96=B0=E5=A2=9E=E9=AA=A8=E6=9E=B6=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../coreshop-page/coreshop-page.vue | 40 ++++++++++---- .../CoreShop/core/hooks/systemInfo.ts | 1 - .../CoreShop/pages/home/home.vue | 14 ++++- .../CoreShop/pages/home/skeleton.ts | 52 +++++++++++++++++++ 4 files changed, 93 insertions(+), 14 deletions(-) create mode 100644 CoreCms.Net.Uni-App/CoreShop/pages/home/skeleton.ts diff --git a/CoreCms.Net.Uni-App/CoreShop/components/coreshop-page/coreshop-page.vue b/CoreCms.Net.Uni-App/CoreShop/components/coreshop-page/coreshop-page.vue index c846633a..dff6f24a 100644 --- a/CoreCms.Net.Uni-App/CoreShop/components/coreshop-page/coreshop-page.vue +++ b/CoreCms.Net.Uni-App/CoreShop/components/coreshop-page/coreshop-page.vue @@ -1,6 +1,7 @@ @@ -30,7 +32,7 @@ handleCustomRouteJump : () => void | null, showLoginModalDom : boolean; needSkeleton : boolean; - skeleton ?: Array; + skeleton ?: Array<{ [key : string] : any }>; skeletonLoading : boolean; placeholder : boolean; loadingPage : boolean; @@ -38,7 +40,7 @@ loadingText : string; loadingTextFontSize : string; loadingBgColor : string; - loadingColor:string; + loadingColor : string; }>(), { isBack: true, bgColor: '#eef2f6', @@ -51,12 +53,7 @@ handleCustomRouteJump: null, showLoginModalDom: false, needSkeleton: false, - skeleton: [{ - type: 'line', - num: 3, - gap: '20rpx', - style: ['width: 200rpx;marginBottom: 50rpx;', 'height: 100rpx;', 'width: 500rpx;'], - }], + skeleton: [], skeletonLoading: false, placeholder: true, loadingPage: false, @@ -64,8 +61,29 @@ loadingText: '加载中...', loadingTextFontSize: '24rpx', loadingBgColor: 'rgba(255, 255, 255, 0.2)', - loadingColor:'#d33123' + loadingColor: '#d33123' }); + + \ No newline at end of file diff --git a/CoreCms.Net.Uni-App/CoreShop/core/hooks/systemInfo.ts b/CoreCms.Net.Uni-App/CoreShop/core/hooks/systemInfo.ts index bc9c363e..d988712a 100644 --- a/CoreCms.Net.Uni-App/CoreShop/core/hooks/systemInfo.ts +++ b/CoreCms.Net.Uni-App/CoreShop/core/hooks/systemInfo.ts @@ -15,7 +15,6 @@ export const useSystemInfo = () => { onMounted(() => { const systemInfo = uni.getSystemInfoSync(); state.systemInfo = systemInfo; - // #ifndef APP const menuButton = uni.getMenuButtonBoundingClientRect(); state.menuButtonHeight = menuButton.height + (menuButton.top - systemInfo.statusBarHeight) * 2; diff --git a/CoreCms.Net.Uni-App/CoreShop/pages/home/home.vue b/CoreCms.Net.Uni-App/CoreShop/pages/home/home.vue index a9035d74..2fb26b2a 100644 --- a/CoreCms.Net.Uni-App/CoreShop/pages/home/home.vue +++ b/CoreCms.Net.Uni-App/CoreShop/pages/home/home.vue @@ -1,6 +1,6 @@