Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toast_ 的关闭回调中使用 navigateBack 导致 异常,页面回到了初始页面,而不是返回上一级页面 #597

Closed
ImpTyrion opened this issue Dec 15, 2023 · 3 comments
Labels
need confirm need confirm

Comments

@ImpTyrion
Copy link

Toast_.success({
message: 'test',
onClose: () => {
navigateBack();
},
});

@zuolung zuolung added the need confirm need confirm label Dec 20, 2023
@zuolung
Copy link
Contributor

zuolung commented Dec 21, 2023

import { Button, View } from '@tarojs/components'
import { navigateBack } from '@tarojs/taro'
import { Toast } from '@antmjs/vantui'

const Toast_ = Toast.createOnlyToast()

export default function Index() {
  const onClick = () => {
    Toast_.show({
      message: '快要返回回了',
      onClose() {
        navigateBack()
      },
    })
  }

  return (
    <View>
      <Toast_ />
      <Button onClick={onClick}>返回</Button>
    </View>
  )
}

没有复现

@ImpTyrion
Copy link
Author

Uploading 2023.12.22.11.05.mp4…

image
我附件上传了视频,不知道能不能看,可以按照我这个简单的demo 再试一下,第三页 back 还是跳到 第一页了

@zuolung
Copy link
Contributor

zuolung commented Jul 12, 2024

3.3.7已修复

@zuolung zuolung closed this as completed Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need confirm need confirm
Projects
None yet
Development

No branches or pull requests

2 participants