Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: vue修复mock/dashboard样式/下拉选择超长问题/菜单管理虚拟滚动 #185

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/toolkits/pro/template/tinyvue/src/api/interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ axios.interceptors.request.use(
axios.interceptors.response.use(
(response: AxiosResponse<HttpResponse>) => {
const res = response;
if (res.request.responseURL.includes('mock')) {
return res.data;
}
return res;
},
(error) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -239,7 +241,9 @@
padding-left: 50px;
}

:deep(.tiny-tabs__content) {
:deep(
.tiny-container__main > .tiny-layout > .tiny-tabs > .tiny-tabs__content
) {
display: none;
}

Expand Down
20 changes: 4 additions & 16 deletions packages/toolkits/pro/template/tinyvue/src/mock/index.ts
Original file line number Diff line number Diff line change
@@ -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<board.length; i+=1){
mockData.push(board[i])
}
for(let i=0; i<list.length; i+=1){
mockData.push(list[i])
}
for(let i=0; i<froms.length; i+=1){
mockData.push(froms[i])
}
for(let i=0; i<profile.length; i+=1){
mockData.push(profile[i])
}
let mockData = [...list, ...froms, ...profile, ...board, ...user] as any;

createMockServer({
mocks: mockData,
})

});
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<template>
<div class="curve">
<img src="@/assets/images/map-background3.png" class="image" />
<h3>{{ $t('home.curve.trend') }}</h3>
<div id="line" ref="echartsDom"></div>
<div class="curve-box">
<div class="curve">
<img src="@/assets/images/map-background3.png" class="image" />
<h3>{{ $t('home.curve.trend') }}</h3>
<div id="line" ref="echartsDom"></div>
</div>
</div>
</template>

Expand Down Expand Up @@ -193,7 +195,7 @@
myChart.resize();
});
nextTick(() => {
myChart.resize()
myChart.resize();
});
});

Expand All @@ -220,13 +222,17 @@
</script>

<style scoped lang="less">
.curve-box {
margin-top: 20px;
padding: 20px 16px;
background: #fff;
border-radius: 6px;
box-shadow: 0 3px 10px #4062e133;
}

.curve {
width: 100%;
height: 491px;
margin-top: 2%;
background: #fff;
border-radius: 6px;
box-shadow: 0 3px 10px 0 rgb(64 98 225 / 20%);
}

#line {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<template>
<div class="falls">
<img src="@/assets/images/map-background2.png" class="image" />
<h3>{{ $t('home.falls.line') }}</h3>
<div id="flow" ref="echartsDom"></div>
<div class="falls-box">
<div class="falls">
<img src="@/assets/images/map-background2.png" class="image" />
<h3>{{ $t('home.falls.line') }}</h3>
<div id="flow" ref="echartsDom"></div>
</div>
</div>
</template>

Expand Down Expand Up @@ -175,7 +177,7 @@
myChart.resize();
});
nextTick(() => {
myChart.resize()
myChart.resize();
});
});

Expand All @@ -187,13 +189,18 @@
</script>

<style scoped lang="less">
.falls-box {
margin-top: 20px;
padding: 20px 16px;
background: #fff;
border-radius: 6px;
box-shadow: 0 3px 10px #4062e133;
}

.falls {
width: 100%;
height: 406px;
margin-top: 2%;
background: #fff;
border-radius: 6px;
box-shadow: 0 3px 10px 0 rgb(64 98 225 / 20%);
}

#flow {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<template>
<div class="region">
<div>
<div class="region-title">
<img src="@/assets/images/map-background3.png" class="image" />
<h3>{{ $t('home.region.title') }}</h3>
<div class="region-box">
<div class="region">
<div>
<div class="region-title">
<img src="@/assets/images/map-background3.png" class="image" />
<h3>{{ $t('home.region.title') }}</h3>
</div>
<div id="earth" ref="echartsDom"></div>
</div>
<div class="region-from">
<RegionTable></RegionTable>
</div>
<div id="earth" ref="echartsDom"></div>
</div>
<div class="region-from">
<RegionTable></RegionTable>
</div>
</div>
</template>
Expand Down Expand Up @@ -115,19 +117,23 @@
myChart.resize();
});
nextTick(() => {
myChart.resize()
myChart.resize();
});
});
</script>

<style scoped lang="less">
.region-box {
margin-top: 20px;
padding: 20px 16px;
background: #fff;
border-radius: 6px;
box-shadow: 0 3px 10px #4062e133;
}

.region {
display: flex;
justify-content: space-between;
margin-top: 2%;
background: #fff;
border-radius: 6px;
box-shadow: 0 3px 10px 0 rgb(64 98 225 / 20%);

.region-title {
display: flex;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<template>
<div class="round">
<div>
<img src="@/assets/images/map-background3.png" class="image" />
<h3>{{ $t('home.round.title') }}</h3>
<div id="circled" ref="echartsDom"></div>
</div>
<div class="round-from">
<RoundTable></RoundTable>
<div class="round-box">
<div class="round">
<div>
<img src="@/assets/images/map-background3.png" class="image" />
<h3>{{ $t('home.round.title') }}</h3>
<div id="circled" ref="echartsDom"></div>
</div>
<div class="round-from">
<RoundTable></RoundTable>
</div>
</div>
</div>
</template>
Expand Down Expand Up @@ -75,7 +77,7 @@
myChart.resize();
});
nextTick(() => {
myChart.resize()
myChart.resize();
});
});

Expand All @@ -87,13 +89,18 @@
</script>

<style scoped lang="less">
.round-box {
margin-top: 20px;
padding: 20px 16px;
background: #fff;
border-radius: 6px;
box-shadow: 0 3px 10px #4062e133;
}

.round {
display: flex;
justify-content: space-between;
margin-top: 2%;
background: #fff;
border-radius: 6px;
box-shadow: 0 3px 10px 0 rgb(64 98 225 / 20%);
}

#circled {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

<style scoped lang="less">
.container {
width: 98%;
height: inherit;
width: 100%;
height: calc(100% - 60px);
margin: 0 auto;
overflow-x: hidden;
overflow-y: auto;
Expand All @@ -33,7 +33,7 @@
// responsive
@media (max-width: @screen-xs) {
.container {
overflow-x: auto;
overflow-x: hidden;
}
}
</style>
Loading