From 771129f3b030b950687a714f329a02242da8d6ba Mon Sep 17 00:00:00 2001 From: fmm <1442620801@qq.com> Date: Sun, 25 Aug 2024 16:14:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20vue=E4=BF=AE=E5=A4=8Dmock/dashboard?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F/=E4=B8=8B=E6=8B=89=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E8=B6=85=E9=95=BF=E9=97=AE=E9=A2=98/=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E8=99=9A=E6=8B=9F=E6=BB=9A=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../template/tinyvue/src/api/interceptor.ts | 3 ++ .../tinyvue/src/layout/default-layout.vue | 12 ++++-- .../pro/template/tinyvue/src/mock/index.ts | 20 ++-------- .../src/views/board/home/components/curve.vue | 24 ++++++----- .../src/views/board/home/components/falls.vue | 23 +++++++---- .../views/board/home/components/region.vue | 34 +++++++++------- .../src/views/board/home/components/round.vue | 31 ++++++++------ .../tinyvue/src/views/board/home/index.vue | 6 +-- .../views/menu/info/components/info-tab.vue | 40 ++++++++----------- .../views/user/info/components/info-tab.vue | 2 +- .../tinyvue/src/views/user/info/index.vue | 8 ++-- 11 files changed, 109 insertions(+), 94 deletions(-) diff --git a/packages/toolkits/pro/template/tinyvue/src/api/interceptor.ts b/packages/toolkits/pro/template/tinyvue/src/api/interceptor.ts index a3bc6610..692b3d79 100644 --- a/packages/toolkits/pro/template/tinyvue/src/api/interceptor.ts +++ b/packages/toolkits/pro/template/tinyvue/src/api/interceptor.ts @@ -46,6 +46,9 @@ axios.interceptors.request.use( axios.interceptors.response.use( (response: AxiosResponse) => { const res = response; + if (res.request.responseURL.includes('mock')) { + return res.data; + } return res; }, (error) => { diff --git a/packages/toolkits/pro/template/tinyvue/src/layout/default-layout.vue b/packages/toolkits/pro/template/tinyvue/src/layout/default-layout.vue index 8835a00c..bcc9e277 100644 --- a/packages/toolkits/pro/template/tinyvue/src/layout/default-layout.vue +++ b/packages/toolkits/pro/template/tinyvue/src/layout/default-layout.vue @@ -77,16 +77,18 @@ Container as TinyContainer, Layout as TinyLayout, Modal as tinyModal, - Tabs, TabItem } from '@opentiny/vue'; + Tabs, + TabItem, + } from '@opentiny/vue'; import TinyThemeTool from '@opentiny/vue-theme/theme-tool.js'; - import { useAppStore , useTabStore } from '@/store'; + import { useAppStore, useTabStore } from '@/store'; // eslint-disable-next-line import/extensions import Footer from '@/components/footer/index.vue'; import NavBar from '@/components/navbar/index.vue'; import Theme from '@/components/theme/index.vue'; import Menu from '@/components/menu/index.vue'; import { DefaultTheme } from '@/components/theme/type'; - import { useRouter } from 'vue-router'; + import { useRouter } from 'vue-router'; import PageLayout from './page-layout.vue'; // 动态切换 const router = useRouter(); @@ -239,7 +241,9 @@ padding-left: 50px; } - :deep(.tiny-tabs__content) { + :deep( + .tiny-container__main > .tiny-layout > .tiny-tabs > .tiny-tabs__content + ) { display: none; } diff --git a/packages/toolkits/pro/template/tinyvue/src/mock/index.ts b/packages/toolkits/pro/template/tinyvue/src/mock/index.ts index a99cfb91..330c7d08 100644 --- a/packages/toolkits/pro/template/tinyvue/src/mock/index.ts +++ b/packages/toolkits/pro/template/tinyvue/src/mock/index.ts @@ -1,24 +1,12 @@ -import {createMockServer} from '@gaonengwww/mock-server'; +import { createMockServer } from '@gaonengwww/mock-server'; import list from './list'; import froms from '../views/form/step/mock'; import profile from './profile'; import board from './board'; +import user from './user'; -let mockData = [] as any -for(let i=0; i -
- -

{{ $t('home.curve.trend') }}

-
+
+
+ +

{{ $t('home.curve.trend') }}

+
+
@@ -193,7 +195,7 @@ myChart.resize(); }); nextTick(() => { - myChart.resize() + myChart.resize(); }); }); @@ -220,13 +222,17 @@ diff --git a/packages/toolkits/pro/template/tinyvue/src/views/menu/info/components/info-tab.vue b/packages/toolkits/pro/template/tinyvue/src/views/menu/info/components/info-tab.vue index 2ceb03c5..1dd2b04f 100644 --- a/packages/toolkits/pro/template/tinyvue/src/views/menu/info/components/info-tab.vue +++ b/packages/toolkits/pro/template/tinyvue/src/views/menu/info/components/info-tab.vue @@ -12,9 +12,9 @@