Commit 33daa5fb by 李嘉林

横向标签吸顶

parent 761a0221
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
@getEleInfo="getEleInfo" @getEleInfo="getEleInfo"
:animated="true" :animated="true"
:ellipsis="false" :ellipsis="false"
:sticky="stickyTop"
:title-active-color="selectTabTextColor" :title-active-color="selectTabTextColor"
:title-inactive-color="defaultTabTextColor" :title-inactive-color="defaultTabTextColor"
:line-position="tabLayout" :line-position="tabLayout"
......
...@@ -46,6 +46,7 @@ VantComponent({ ...@@ -46,6 +46,7 @@ VantComponent({
}, },
methods: { methods: {
onScroll({ scrollTop } = {}) { onScroll({ scrollTop } = {}) {
return;
const { container, offsetTop, disabled } = this.data; const { container, offsetTop, disabled } = this.data;
if (disabled) { if (disabled) {
this.setDataAfterDiff({ this.setDataAfterDiff({
......
<wxs src="../wxs/utils.wxs" module="utils" /> <wxs src="../wxs/utils.wxs" module="utils" />
<wxs src="./index.wxs" module="computed" /> <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 }) }}"> <view class="{{ utils.bem('sticky-wrap', { fixed }) }}" style="{{ computed.wrapStyle({ fixed, offsetTop, transform, zIndex }) }}">
<slot /> <slot />
</view> </view>
......
@import '../common/index.wxss';.van-sticky{position:relative}.van-sticky-wrap--fixed{position:fixed;right:0;left:0} @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 \ 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