Skip to content

Commit 2f8f88d

Browse files
committed
【fix】 幻灯片模板优化; review by xiongjj
1 parent 191dea2 commit 2f8f88d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

examples/component/components_slideshow_vue.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
height: 380px;
2525
border-radius: 4px;
2626
}
27-
2827
</style>
2928
</head>
3029

@@ -33,7 +32,8 @@
3332
<sm-web-map map-id='567946816' :map-options="mapOptions" server-url='https://www.supermapol.com'
3433
tianditu-key='1d109683f4d84198e37a38c442d68311' @load="mapLoaded">
3534
</sm-web-map>
36-
<sm-slideshow :collapsed="false" :autoplay="autoplay" :pagination="pagination" @change="slideChange">
35+
<sm-slideshow v-if="content.length > 0" :collapsed="false" :autoplay="autoplay" :pagination="pagination"
36+
@change="slideChange">
3737
<sm-slideshow-item v-for="item of content" :key="item.title">
3838
<h3 style="margin-top: 8px;">{{ item.title }}</h3>
3939
<p style="padding: 8px;">{{ item.description }}</p>
@@ -54,6 +54,7 @@ <h3 style="margin-top: 8px;">{{ item.title }}</h3>
5454
},
5555
content: '',
5656
pagination: {
57+
el: '.swiper-pagination',
5758
type: 'bullets',
5859
clickable: true
5960
},
@@ -93,6 +94,7 @@ <h3 style="margin-top: 8px;">{{ item.title }}</h3>
9394
},
9495
mapLoaded(e) {
9596
this.map = e.map;
97+
this.slideChange({ realIndex: 0 });
9698
}
9799
}
98100
})

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy