fix SwipeItem size prop

This commit is contained in:
陈嘉涵 2019-01-30 20:29:43 +08:00
parent 70caee3dd5
commit cb69bcbb99

View File

@ -18,11 +18,11 @@ export default sfc({
}, },
render(h) { render(h) {
const { vertical } = this.$parent; const { vertical, computedWidth, computedHeight } = this.$parent;
const style = { const style = {
width: this.computedWidth + 'px', width: computedWidth + 'px',
height: vertical ? this.computedHeight + 'px' : '100%', height: vertical ? computedHeight + 'px' : '100%',
transform: `translate${vertical ? 'Y' : 'X'}(${this.offset}px)` transform: `translate${vertical ? 'Y' : 'X'}(${this.offset}px)`
}; };