The causes are:
The component u-sticky and the bottom navigation bar tabbar conflict when switching pages, the sticky component creates an Observer listener, and when the page is switched and not destroyed, it causes the component to remain listening, so the error Cannot read property ‘bottom’ of null appears. So we need to disconnect the Observer listener manually to solve this error problem
Source code:
<u-sticky offset-top="200" > </u-sticky>
Modified:
<template>
<u-sticky offset-top="200" :enable="enable">
</u-sticky>
</template>
<script>
export default {
data() {
return {
// @property {Boolean} enable Whether to open the ceiling function(default is true)
enable:true
}
},
// Turn on or off listeners in the corresponding show and hide page lifecycle
onShow() {
this.enable= true
},
onHide() {
this.enable= false
}
}
</script>
Read More:
- El-cascader error: Cannot read property’level’ of null
- openlayers — Cannot read property ‘slice‘ of null—Map cannot be loaded
- VUE Echarts Loading Error TypeError: Cannot read property getAttribute of null?
- Vue ElementUI el-dropdown Error: Uncaught TypeError: Cannot read property ‘disabled‘ of null
- [Solved] Neo4j error: Cannot merge the following node because of null property value for ‘casualty’
- [Solved] Vue + uniapp Uncaught TypeError: Cannot read property ‘getters‘ of undefined
- Can’t read property ‘push’ of undefined [How to Solve]
- [Solved] Cannot read properties of undefined (reading ‘ajax‘); Cannot read property ‘ajax‘ of undefined
- Vue Error in callback for immediate watcher “height”: “TypeError: Cannot read property ‘style’ of
- [Solved] vue.runtime.esm.js?2b0e:619 [Vue warn]: Error in render: “TypeError: Cannot read property ‘length‘
- Vue error in render: “typeerror: cannot read property ‘length’ of undefined”
- [Solved] VUE Use Filters Error: [Vue warn]: Error in render: “TypeError: Cannot read property ‘toFixed’ of undefined”
- [Vue warn]: Error in render: TypeError: Cannot read property ‘xxxx’of undefined
- [Solved] Vue Error: Uncaught TypeError: Cannot read property ‘getters‘ of undefined
- [Solved] Echarts Error: Cannot read property ‘init‘ of undefined
- Wechat program typeerror: a solution to cannot read property ‘SetData’ of undefined
- [Solved] TypeError: Cannot read property ‘indexOf‘ of undefined at VueComponent.resetFields
- [Solved] Parcel Package Error: Cannot read property ‘length‘ of undefined
- cesium CLAMP_TO_GROUND Error Cannot read property ‘globe‘ of undefined