更新记录

V1.0.0(2021-11-16)

1.首次上传


平台兼容性

Vue2 Vue3
×
App 快应用 微信小程序 支付宝小程序 百度小程序 字节小程序 QQ小程序
HBuilderX 3.2.0 app-vue × × × × ×
钉钉小程序 快手小程序 飞书小程序 京东小程序
× × × ×
H5-Safari Android Browser 微信浏览器(Android) QQ浏览器(Android) Chrome IE Edge Firefox PC-Safari
× × × × × × × × ×

gif

页面代码:
    <view>
        <view class="" style="height: 300rpx;margin-bottom: 20rpx;">
            <image src="/static/img.png" style="width: 100%;height: 100%;"></image>
        </view>
        <view class="" id="tab">
            <jsFixedTab :topHeight="topHeight" :topDistance="topDistance" :activeIndex="activeIndex" @chooseItem="chooseItem" :list="list"></jsFixedTab>
        </view>
        <view class="">
            内容区域
            <view class="" v-for="i in 10">
                <view class="" style="">
                    {{i + 1}}
                </view>
                <image src="/static/img.png" style="width: 100%;height: 300rpx;"></image>
            </view>
        </view>
    </view>
引入组件:
import jsFixedTab from "@/components/js-fixedTab/js-fixedTab.vue"
export default {
    components:{
        jsFixedTab
    },
    data() {
        return {
            topHeight: 0, //距顶部的距离
            topDistance: 0,//滑动的距离  

            activeIndex:0,
            list:['语文','数学','英语','政治','地理','历史'],
        }
    },
    onLoad() {
        const query = uni.createSelectorQuery().in(this).select('#tab');
        query.boundingClientRect(data => {
            this.topHeight = data.top;
        }).exec();
    },
    onPageScroll(res) {
        this.topDistance = res.scrollTop
    },
    methods: {
        chooseItem(e){
            this.activeIndex = e 
        }
    }
}

隐私、权限声明

1. 本插件需要申请的系统权限列表:

2. 本插件采集的数据、发送的服务器地址、以及数据用途说明:

3. 本插件是否包含广告,如包含需详细说明广告表达方式、展示频率:

许可协议

MIT协议

暂无用户评论。

使用中有什么不明白的地方,就向插件作者提问吧~ 我要提问