diff --git a/packages/taro-components-advanced/src/components/virtual-waterfall/react/wrapper.ts b/packages/taro-components-advanced/src/components/virtual-waterfall/react/wrapper.ts index 331c54625456..0301324dd8e9 100644 --- a/packages/taro-components-advanced/src/components/virtual-waterfall/react/wrapper.ts +++ b/packages/taro-components-advanced/src/components/virtual-waterfall/react/wrapper.ts @@ -21,19 +21,18 @@ function getRenderExpandNodes ({ const props: any = { key: id, id, - } - if (!renderExpand) { - props.style = { + style: { visibility: 'hidden', height: 100, marginTop: -100, zIndex: -1, } } - return React.createElement( - renderExpand || innerElement, - props, - ) + const expands = [renderExpand && React.createElement(renderExpand), React.createElement(innerElement!, props)] + if (direction === 'top') { + expands.reverse() + } + return expands } const outerWrapper = React.forwardRef(