Merge branch '2.x' into dev
This commit is contained in:
+8
-4
@@ -110,13 +110,17 @@ export default createComponent({
|
||||
const trackStyle = computed(() => {
|
||||
const mainAxis = props.vertical ? 'height' : 'width';
|
||||
const crossAxis = props.vertical ? 'width' : 'height';
|
||||
|
||||
return {
|
||||
[mainAxis]: `${trackSize.value}px`,
|
||||
[crossAxis]: props[crossAxis] ? `${props[crossAxis]}px` : '',
|
||||
const style = {
|
||||
transitionDuration: `${state.swiping ? 0 : props.duration}ms`,
|
||||
transform: `translate${props.vertical ? 'Y' : 'X'}(${state.offset}px)`,
|
||||
};
|
||||
|
||||
if (size.value) {
|
||||
style[mainAxis] = `${trackSize.value}px`;
|
||||
style[crossAxis] = props[crossAxis] ? `${props[crossAxis]}px` : '';
|
||||
}
|
||||
|
||||
return style;
|
||||
});
|
||||
|
||||
const getTargetActive = (pace) => {
|
||||
|
||||
Reference in New Issue
Block a user