Skip to content

Commit 90c3eca

Browse files
author
潘卓然Y7000P
committed
【站点】【修复】【修复图片懒加载问题】
1 parent 777ab5c commit 90c3eca

3 files changed

Lines changed: 66 additions & 62 deletions

File tree

website/public/static/demo/mapboxgl/example/vue/raster/reversebbox.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
layerWmsId: 'ogcwms_layerId',
101101
sourceWmsId: 'ogcwms_sourceId',
102102
wmsurl:
103-
'http://219.142.81.85/arcgis/services/10wanZH/MapServer/WMSServer?service=WMS&request=GetMap&layers=0,1,2,3,5,7,9,11&styles=&format=image/png&transparent=true&version=1.3.0&height=512&width=512&crs=EPSG:4326&bbox={bbox}',
103+
'http://219.142.81.85/arcgis/services/10wanZH/MapServer/WMSServer?service=WMS&request=GetMap&layers=0,1,2,3,5,7,9,11&styles=&format=image/png&transparent=true&version=1.3.0&height=512&width=512&crs=EPSG:4326&bbox={bbox}&reversebbox=true',
104104
reversebbox: true // 转置arcgis的bbox [minx,miny,maxx,maxy] -> [miny,minx,maxy,maxx]
105105
};
106106
},

website/src/components/CardView/index.vue

Lines changed: 62 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@
1212
>
1313
<img
1414
lazy
15-
:src="imgUrl"
15+
v-lazy="imgUrl"
1616
class="card-image"
1717
/>
18-
<!-- <el-image
18+
<!-- <el-image
1919
lazy
2020
:src="imgUrl"
21+
:scroll-container="webclientScrollContainer"
2122
class="card-image"
2223
>
2324
<div
@@ -42,6 +43,7 @@ export default {
4243
components: {},
4344
data () {
4445
return {
46+
webclientScrollContainer: "el-scrollbar__wrap",
4547
lazyImg: true,
4648
nullImg: "./static/assets/components/CardGroup/null-img.png",
4749
nullUser: "./static/assets/user/admin-big.png",
@@ -123,68 +125,69 @@ export default {
123125

124126
<style lang="scss">
125127
.gallery-card-div {
126-
margin: 4px;
127-
display: flex;
128-
.card-image {
129-
height: 256px;
130-
width: 256px;
131-
/* min-height: 256px;
128+
margin: 4px;
129+
display: flex;
130+
.card-image {
131+
height: 256px;
132+
width: 256px;
133+
/* min-height: 256px;
132134
min-width: 256px; */
133-
}
134-
.el-card__header {
135-
padding: 0px 0px;
136-
border-bottom: 1px solid #ebeef5;
137-
-webkit-box-sizing: border-box;
138-
box-sizing: border-box;
139-
}
140-
.el-card {
141-
background: transparent;
142-
}
143-
.el-card__body {
144-
background: transparent;
145-
}
146-
.gallery-card-wrapper {
147-
.box-card-header {
148-
position: relative;
149-
margin-top: 0px;
150-
margin-left: 0px;
151-
margin-right: 0px;
152-
height: 100%;
153-
/* width: calc( 20vw - 60px); */
154-
img {
155-
height: 100%;
156-
width: 100%;
157-
transition: all 0.2s linear;
158-
&:hover {
159-
transform: scale(1.1, 1.1);
160-
/* filter: contrast(130%); */
161-
}
162-
}
163-
.title {
164-
font-size: 18px;
165-
}
166135
}
167-
.card-content {
168-
// width: calc( (100vw - 550px) / 4);
169-
/* width: 250px; */
170-
span {
171-
color: #888;
172-
}
136+
.el-card__header {
137+
padding: 0px 0px;
138+
border-bottom: 1px solid #ebeef5;
139+
-webkit-box-sizing: border-box;
140+
box-sizing: border-box;
173141
}
174-
span {
175-
font-size: 14px;
142+
.el-card {
143+
background: transparent;
144+
}
145+
.el-card__body {
146+
background: transparent;
147+
}
148+
.gallery-card-wrapper {
149+
.box-card-header {
150+
position: relative;
151+
margin-top: 0px;
152+
margin-left: 0px;
153+
margin-right: 0px;
154+
height: 100%;
155+
/* width: calc( 20vw - 60px); */
156+
img {
157+
height: 100%;
158+
width: 100%;
159+
transition: all 0.2s linear;
160+
&:hover {
161+
transform: scale(1.1, 1.1);
162+
/* filter: contrast(130%); */
163+
}
164+
}
165+
.title {
166+
font-size: 18px;
167+
}
168+
}
169+
.card-content {
170+
// width: calc( (100vw - 550px) / 4);
171+
/* width: 250px; */
172+
span {
173+
color: #888;
174+
}
175+
}
176+
span {
177+
font-size: 14px;
178+
}
176179
}
177-
}
178180
}
179181
.gallery-card-wrapper:hover {
180-
border-radius: 4px;
181-
background: linear-gradient(
182-
90deg,
183-
rgba(71, 148, 250, 1),
184-
rgba(49, 225, 230, 1)
185-
);
186-
.title {
187-
color: #ffffff;
188-
}
182+
border-radius: 4px;
183+
background: linear-gradient(90deg, rgba(71, 148, 250, 1), rgba(49, 225, 230, 1));
184+
.title {
185+
color: #ffffff;
186+
}
187+
.el-icon-picture-outline {
188+
height: 256px;
189+
width: 256px;
190+
background: #888;
191+
}
189192
}
190193
</style>

website/src/views/gallery/Gallery.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@
5151
</div>
5252
<el-scrollbar
5353
ref="componentScrollBar"
54+
id="webclient-scroll-container"
5455
:class="{'gallery-scroll-content': true, 'gallery-scroll-content-mobile': mobile}"
55-
wrapStyle="overflow-x: hidden;"
56-
viewStyle="overflow-x: hidden;display:inline-grid;"
56+
wrapStyle="overflow: auto;"
57+
viewStyle="overflow: auto; display:inline-grid;"
5758
>
5859
<el-backtop></el-backtop>
5960
<gallery-card

0 commit comments

Comments
 (0)