quasar-framework
Version:
Build responsive SPA, SSR, PWA, Hybrid Mobile Apps and Electron apps, all simultaneously using the same codebase
31 lines (30 loc) • 591 B
JavaScript
export default {
name: 'QCarouselControl',
props: {
position: {
type: String,
default: 'bottom-right'
},
offset: {
type: Array,
default: () => [18, 18]
}
},
computed: {
computedClass () {
return `absolute-${this.position}`
},
computedStyle () {
return {
margin: `${this.offset[1]}px ${this.offset[0]}px`
}
}
},
render (h) {
return h('div', {
staticClass: 'q-carousel-control absolute',
style: this.computedStyle,
'class': this.computedClass
}, this.$slots.default)
}
}