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

在taro4版本中用函数方式调用toast和Dialog等没有反应也不出弹出 #2584

Open
wangyuan0108 opened this issue Sep 11, 2024 · 5 comments
Labels
to be closed 未提供最小化可复现 demo 且长期无进展的 issue

Comments

@wangyuan0108
Copy link
Contributor

NutUI React 包名

@nutui/nutui-react-taro

NutUI React 版本号

2.6.14

平台

h5

重现链接

重现步骤

正常使用

期望的结果是什么?

正常使用

实际的结果是什么?

没有反应

环境信息

Taro CLI 4.0.5 environment info:
System:
OS: macOS 14.6.1
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.12.1 - ~/Library/Caches/fnm_multishells/54868_1725947185864/bin/node
Yarn: 1.22.22 - ~/Library/pnpm/yarn
npm: 10.5.0 - ~/Library/Caches/fnm_multishells/54868_1725947185864/bin/npm
npmPackages:
@tarojs/cli: 4.0.5 => 4.0.5
@tarojs/components: 4.0.5 => 4.0.5
@tarojs/helper: 4.0.5 => 4.0.5
@tarojs/plugin-framework-react: 4.0.5 => 4.0.5
@tarojs/plugin-html: 4.0.5 => 4.0.5
@tarojs/plugin-platform-alipay: 4.0.5 => 4.0.5
@tarojs/plugin-platform-h5: 4.0.5 => 4.0.5
@tarojs/plugin-platform-jd: 4.0.5 => 4.0.5
@tarojs/plugin-platform-qq: 4.0.5 => 4.0.5
@tarojs/plugin-platform-swan: 4.0.5 => 4.0.5
@tarojs/plugin-platform-tt: 4.0.5 => 4.0.5
@tarojs/plugin-platform-weapp: 4.0.5 => 4.0.5
@tarojs/react: 4.0.5 => 4.0.5
@tarojs/runtime: 4.0.5 => 4.0.5
@tarojs/shared: 4.0.5 => 4.0.5
@tarojs/taro: 4.0.5 => 4.0.5
@tarojs/taro-loader: 4.0.5 => 4.0.5
@tarojs/webpack5-runner: 4.0.5 => 4.0.5
babel-preset-taro: 4.0.5 => 4.0.5

其他补充信息

No response

@xiaoyatong
Copy link
Collaborator

image 看一下这个demo 是否可用 https://github.com/jdf2e/nutui-demos/blob/main/nutui-react/v2/taro4

@zuishuaicc
Copy link

我是编译成微信小程序,Dialog和Toast通过函数方式调用不触发

@oasis-cloud
Copy link
Collaborator

oasis-cloud commented Jan 20, 2025

可提供一份可复现的 demo,目前在 taro 4.0.6 nutui 2.6.23 以上环境中未复现。@zuishuaicc @wangyuan0108
可通过 https://github.com/jdf2e/nutui-demos 仓库进行验证

Image

@laoona
Copy link

laoona commented Jan 20, 2025

一样的问题,函数式调用,也没反映,版本如下:
"@nutui/nutui-react-taro": "3.0.0-beta.6",
"@tarojs/taro": "4.0.9",

@oasis-cloud
Copy link
Collaborator

这样使用的吗

<>
            <Toast id="test" />
            <Cell
                title="函数调用"
                onClick={() => {
                    Toast.show('test', {
                        title: '函数调用函数调用',
                        content: '函数调用函数调用函数调用函数调用函数',
                        type: 'fail',
                        duration: 2,
                        position: 'center',
                        icon: <Jd color="#ffffff"/>,
                        lockScroll: true,
                        onClose: () => {
                            console.log('close')
                        },
                    })
                }}
            />
        </>

@oasis-cloud oasis-cloud added the to be closed 未提供最小化可复现 demo 且长期无进展的 issue label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to be closed 未提供最小化可复现 demo 且长期无进展的 issue
Projects
None yet
Development

No branches or pull requests

5 participants