Skip to content

Commit 8f04d56

Browse files
committed
feat: SSR support for Carousel (1/2)
1 parent 43b163c commit 8f04d56

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/components/carousel/QCarousel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,9 +441,9 @@ export default {
441441
'infinite-right': this.infiniteRight
442442
}
443443
}, [
444-
h('div', { staticClass: 'q-carousel-slide', style: `flex: 0 0 ${100}%`, directives: [{ name: 'show', value: this.infiniteRight }] }),
444+
this.infiniteRight ? h('div', { staticClass: 'q-carousel-slide', style: `flex: 0 0 ${100}%` }) : null,
445445
this.$slots.default,
446-
h('div', { staticClass: 'q-carousel-slide', style: `flex: 0 0 ${100}%`, directives: [{ name: 'show', value: this.infiniteLeft }] })
446+
this.infiniteLeft ? h('div', { staticClass: 'q-carousel-slide', style: `flex: 0 0 ${100}%` }) : null
447447
])
448448
]),
449449
this.arrows ? h(QBtn, {

src/mixins/can-render.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
data () {
55
const is = this.$q.platform.is
66
return {
7-
canRender: (is.cordova || is.electron) === true
7+
canRender: is.cordova || is.electron
88
}
99
},
1010
mounted () {

0 commit comments

Comments
 (0)