[new feature] #734 swipe组件支持垂直滚动 (#938)

This commit is contained in:
nrz
2018-04-27 22:57:44 +08:00
committed by neverland
parent fa8f88c7be
commit 21372bea96
7 changed files with 109 additions and 23 deletions
+4 -2
View File
@@ -18,9 +18,11 @@ export default create({
computed: {
style() {
const { vertical, width, height } = this.$parent;
return {
width: this.$parent.width + 'px',
transform: `translate(${this.offset}px, 0)`
width: width + 'px',
height: vertical ? height + 'px' : '100%',
transform: `translate${vertical ? 'Y' : 'X'}(${this.offset}px)`
};
}
},