Commit 33daa5fb by 李嘉林

横向标签吸顶

parent 761a0221
......@@ -39,6 +39,7 @@
@getEleInfo="getEleInfo"
:animated="true"
:ellipsis="false"
:sticky="stickyTop"
:title-active-color="selectTabTextColor"
:title-inactive-color="defaultTabTextColor"
:line-position="tabLayout"
......
......@@ -46,6 +46,7 @@ VantComponent({
},
methods: {
onScroll({ scrollTop } = {}) {
return;
const { container, offsetTop, disabled } = this.data;
if (disabled) {
this.setDataAfterDiff({
......
<wxs src="../wxs/utils.wxs" module="utils" />
<wxs src="./index.wxs" module="computed" />
<view class="custom-class van-sticky" style="{{ computed.containerStyle({ fixed, height, zIndex }) }}">
<view class="custom-class van-sticky" class="{{!disabled?'van-sticky':''}}" style="{{ computed.containerStyle({ fixed, height, zIndex }) }}">
<view class="{{ utils.bem('sticky-wrap', { fixed }) }}" style="{{ computed.wrapStyle({ fixed, offsetTop, transform, zIndex }) }}">
<slot />
</view>
......
@import '../common/index.wxss';.van-sticky{position:relative}.van-sticky-wrap--fixed{position:fixed;right:0;left:0}
\ No newline at end of file
@import '../common/index.wxss';.van-sticky{position:sticky;top:0;}.van-sticky-wrap--fixed{position:fixed;right:0;left:0}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment