oak-general-business/lib/miniprogram_npm/lin-ui/sticky-item/index.wxml

17 lines
766 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<view class="l-sticky-item l-class">
<!-- sticky-item-header-wrapper用于占位因为sticky-item-header吸顶后脱离文档流导致sticky-item组件高度减小 -->
<view
class="l-sticky-item-header-wrapper l-header-wrapper-class"
style="height:{{isFixedTop&&stickyItemWrapperHeight?stickyItemWrapperHeight+'px':'auto'}}"
></view>
<view
style="{{mode==='js'?(isFixedTop?'position:fixed;':''):''}} top:{{top}}rpx"
class="l-sticky-item-header l-sticky-item-header{{mode==='js'?(isFixedTop?'-fixed l-header-sticky-class':''):(mode==='css'?'-sticky l-header-sticky-class':'')}} l-header-class"
>
<slot name="header"></slot>
</view>
<view class="l-sticky-item-body l-body-class">
<slot name="body"></slot>
</view>
</view>