陌上人如玉
公子世无双

uniapp使用sticky组件,报错Cannot read properties of null (reading 'bottom')

<template>
    <view>
        <u-sticky :enable="enable">
        </u-sticky>
    </view>
</template>
<script>
export default {
    data() {
        return {
            enable: true
        }
    },
    // 在对应的show和hide页面生命周期中打开或关闭监听
    onShow() {
        this.enable= true
    },
    onHide() {
        this.enable= false
    }
}
</script>
赞(0) 打赏
未经允许不得转载:陌上寒 » uniapp使用sticky组件,报错Cannot read properties of null (reading 'bottom')

评论 抢沙发

觉得文章有用就打赏一下文章作者

非常感谢你的打赏,我们将继续给力更多优质内容,让我们一起创建更加美好的网络世界!

微信扫一扫

支付宝扫一扫