jd-opensource / jd-opensource/taro-ui

AtMessage在多个页面都添加时,, 在后代页面加载后, 上一页的atmessage 无显示

Open
#1,292 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.7k
Forks
740
PR merge metrics
No merged PRs in 30d

Description

### Taro UI 版本信息

v2.3.4

### 问题描述

AtMessage在父子页面都添加时,, 在子页面加载后, 父页面的atmessage 无显示

### 复现步骤

1. 创建2个页面 a.tsx, b.tsx
2. a,b 页面都增加 组件
3. 由a页面进入b页面然后返回,按钮点击调用Taro.atMessage函数

### 复现代码

function a() {
return

{
atMessage({
title: 'test',
type: 'error'
})
}}>

}

function b() {
return


}

### 报错信息

atMessage无展示信息

### 系统信息

Taro CLI 3.0.9 environment info:
System:
OS: macOS 11.1
Shell: 3.1.2 - /usr/local/bin/fish
Binaries:
Node: 14.9.0 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.8 - /usr/local/bin/npm
npmPackages:
@tarojs/components: 3.0.9 => 3.0.9
@tarojs/mini-runner: 3.0.9 => 3.0.9
@tarojs/react: 3.0.9 => 3.0.9
@tarojs/runtime: 3.0.9 => 3.0.9
@tarojs/taro: 3.0.9 => 3.0.9
@tarojs/webpack-runner: 3.0.9 => 3.0.9
babel-preset-taro: 3.0.9 => 3.0.9
eslint-config-taro: 3.0.9 => 3.0.9
react: ^16.10.0 => 16.14.0
taro-ui: 3.0.0-alpha.3 => 3.0.0-alpha.3

### 补充信息

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.