Skip to content

Commit c8c9c4c

Browse files
author
潘卓然Y7000P
committed
补充website的细节优化&移动端适配&图表显示
1 parent 0c8593d commit c8c9c4c

22 files changed

Lines changed: 2150 additions & 291 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<template>
2+
<div class="plugins-group-card">
3+
<div v-for="(g,i) in Object.keys(list)" :key="i" class="group">
4+
<el-row>
5+
<el-col
6+
:xs="24"
7+
:sm="12"
8+
:md="8"
9+
:lg="6"
10+
v-for="(l,index) in list[g].list"
11+
:key="index"
12+
>
13+
<el-card v-bind:style="list[g].styleObject" class="little-card">
14+
<h2 class="info-title">{{l.name}}</h2>
15+
<p>{{l.info}}</p>
16+
</el-card>
17+
</el-col>
18+
</el-row>
19+
</div>
20+
</div>
21+
</template>
22+
23+
<script>
24+
export default {
25+
props: {
26+
list: Object
27+
}
28+
}
29+
</script>
30+
31+
<style lang="scss">
32+
.plugins-group-card {
33+
.group {
34+
.el-card {
35+
width: 90%;
36+
height: 200px;
37+
// display: inline-block;
38+
margin: 12px;
39+
border-radius: 20px;
40+
}
41+
}
42+
}
43+
</style>

website/src/components/CardView/index.vue

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,23 @@
1010
slot="header"
1111
class="box-card-header"
1212
>
13-
<img lazy
13+
<img
14+
lazy
1415
:src="imgUrl"
1516
class="card-image"
1617
/>
18+
<!-- <el-image
19+
lazy
20+
:src="imgUrl"
21+
class="card-image"
22+
>
23+
<div
24+
slot="error"
25+
class="card-image"
26+
>
27+
<i class="el-icon-picture-outline"></i>
28+
</div>
29+
</el-image> -->
1730
</div>
1831
<div style="position:relative;">
1932
<span class="title">{{ name }}</span>
@@ -115,6 +128,8 @@ export default {
115128
.card-image {
116129
height: 256px;
117130
width: 256px;
131+
/* min-height: 256px;
132+
min-width: 256px; */
118133
}
119134
.el-card__header {
120135
padding: 0px 0px;

website/src/main.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ import ElementUI from 'element-ui';
1111
import IconFont from './components/IconFont/iconfont'
1212
import VueLazyload from 'vue-lazyload'
1313

14+
import ECharts from 'vue-echarts'
15+
import 'echarts/lib/chart/bar'
16+
import 'echarts/lib/component/tooltip'
17+
Vue.component('v-chart', ECharts)
18+
1419
Vue.use(ElementUI);
1520
Vue.use(VueLazyload);
1621

website/src/router/index.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,21 @@ export const routes = [
6161
name: "download",
6262
component: () => import("@/views/total/Download"),
6363
},
64+
{
65+
path: "detailChart",
66+
name: "detailChart",
67+
component: () => import("@/views/total/DetailChart"),
68+
},
69+
{
70+
path: "pluginTags",
71+
name: "pluginTags",
72+
component: () => import("@/views/total/PluginTags"),
73+
},
74+
{
75+
path: "bugCommit",
76+
name: "bugCommit",
77+
component: () => import("@/views/total/BugCommit"),
78+
}
6479
],
6580
},
6681
{

website/src/views/demo/ShowCase.vue

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<template>
2-
<el-container class="webclient-showcase-main">
2+
<el-container :class="{'webclient-showcase-main': true, 'webclient-showcase-main-mobile' : mobile}">
33
<el-header
44
v-if="!fullScreen"
5-
style="height:72px;padding:0px;"
5+
style="height:72px;"
6+
:class="{'mapgis-header': !mobile, 'mapgis-header-mobile': mobile}"
67
>
78
<transition name="bounce">
89
<Header></Header>
@@ -93,7 +94,7 @@ export default {
9394
components: {
9495
Header,
9596
MainFooter,
96-
SidebarDemo,
97+
SidebarDemo, //边栏展示
9798
IconFont,
9899
ShowGallery
99100
},
@@ -127,6 +128,12 @@ export default {
127128
methods: {
128129
handleFullscreen (fullscreen) {
129130
this.fullScreen = fullscreen;
131+
if (fullscreen && this.mobile) {
132+
var mobileContent = document.getElementsByClassName("main-demo-wrapper");
133+
if (mobileContent.length > 0) {
134+
mobileContent[0].style.height = window.innerHeight - 20 + 'px';
135+
}
136+
}
130137
},
131138
handleDrawer () {
132139
this.drawerShow = !this.drawerShow;
@@ -192,7 +199,25 @@ export default {
192199
</script>
193200

194201
<style rel="stylesheet/scss" lang="scss" scoped>
202+
.webclient-showcase-main-mobile {
203+
.main-demo-wrapper {
204+
margin-left: 0px !important;
205+
height: calc(100vh - 155px) !important;
206+
}
207+
.main-scroll-content {
208+
overflow-y: hidden;
209+
padding: 6px !important;
210+
}
211+
.mapgis-header-mobile {
212+
padding: 0px !important;
213+
height: 48px !important;
214+
}
215+
}
195216
.webclient-showcase-main {
217+
/* .mapgis-header {
218+
padding: 0px;
219+
height: 72px;
220+
} */
196221
.el-footer {
197222
padding: 0 0px;
198223
}

website/src/views/demo/ShowGallery.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="gallery-image-col">
2+
<div :class="{'gallery-image-col':true, 'gallery-image-col-mobile':mobile}">
33
<div
44
v-for="(item, i) in list"
55
:key="i"
@@ -124,6 +124,13 @@ export default {
124124
</script>
125125

126126
<style lang="less" scoped>
127+
.gallery-image-col-mobile {
128+
margin: 6px 0px !important;
129+
.image {
130+
height: 64px !important;
131+
width: 64px !important;
132+
}
133+
}
127134
.gallery-image-col {
128135
display: flex;
129136
margin: 10px 0px;

website/src/views/demo/index.vue

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<template>
22
<splitpanes
33
:horizontal="mobile"
4-
class="default-theme webclient-showcase"
4+
:class="{'default-theme': true, 'webclient-showcase': true, 'webclient-showcase-mobile': mobile}"
55
>
6-
<pane size="60">
6+
<pane :size="mobile ? 60 :60">
77
<el-row
88
v-loading="loading"
9-
class="webclient-showcase-content"
9+
:class="{'webclient-showcase-content':true}"
1010
>
1111
<!-- <el-button
1212
v-show="full"
@@ -30,12 +30,13 @@
3030
</pane>
3131
<pane
3232
min-size="0"
33-
size="40"
33+
:size="mobile ? 40 :40"
3434
>
3535
<el-button-group class="toolbar-showcase-group">
3636
<el-tooltip
3737
class="item"
3838
effect="dark"
39+
v-show="!mobile"
3940
:content="fullscreen ? '关闭全屏': '开启全屏'"
4041
placement="top"
4142
>
@@ -343,7 +344,10 @@ export default {
343344
markdownContent[markdownContent.length - 1].style.height = window.innerHeight - 92 + "px";
344345
} else {
345346
if (this.mobile) {
347+
window.console.log('scoll', demoContent, markdownContent);
346348
codeContent[0].style.height = window.innerHeight / 2 - 162 + "px";
349+
// demoContent[0].style.height = window.innerHeight - 102 + "px";
350+
// markdownContent[markdownContent.length - 1].style.height = window.innerHeight - 242 + "px";
347351
} else {
348352
codeContent[0].style.height = window.innerHeight - 295 + "px";
349353
demoContent[0].style.height = window.innerHeight - 230 + "px";
@@ -474,6 +478,12 @@ export default {
474478
.splitpanes__pane {
475479
background-color: #ffffff !important;
476480
}
481+
.webclient-showcase-mobile {
482+
.element-scroll-content {
483+
height: calc(100vh - 45vh - 150px) !important;
484+
overflow-x: hidden;
485+
}
486+
}
477487
.webclient-showcase {
478488
.showcase-exit-fullscreen {
479489
position: absolute;
@@ -508,7 +518,7 @@ export default {
508518
}
509519
510520
.iframemobile {
511-
height: calc(50vh - 80px);
521+
height: 100%;
512522
}
513523
514524
.editer-codemirror-content {

0 commit comments

Comments
 (0)