mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 02:31:21 +00:00
[new feature] Swipe: support custom item width & height (#1664)
This commit is contained in:
@@ -18,10 +18,11 @@ export default create({
|
||||
|
||||
computed: {
|
||||
style() {
|
||||
const { vertical, width, height } = this.$parent;
|
||||
const { vertical, computedWidth, computedHeight } = this.$parent;
|
||||
|
||||
return {
|
||||
width: width + 'px',
|
||||
height: vertical ? height + 'px' : '100%',
|
||||
width: computedWidth + 'px',
|
||||
height: vertical ? computedHeight + 'px' : '100%',
|
||||
transform: `translate${vertical ? 'Y' : 'X'}(${this.offset}px)`
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user