componentDidMount(){ let { navigation } = this.props navigation.addListener('beforeRemove', (e) => { e.preventDefault(); // 阻止屏幕离开的默认行为 }) }
componentDidMount(){ let { navigation } = this.props navigation.addListener('beforeRemove', (e) => { e.preventDefault(); // 阻止屏幕离开的默认行为 }) }