-
Notifications
You must be signed in to change notification settings - Fork 267
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
tab中使用datepick不显示 #2828
Comments
popup 系列组件都这样 |
猜测应该是
对于其他popup类组件,都只要设置 |
才发现这个问题之前已经有了 #2405 |
如果是taro开发小程序的话可以类似这样,应该适用于所有popup类组件: import { useState } from 'react';
import { DatePicker } from '@nutui/nutui-react-taro';
export default function Demo() {
const [dom, setDom] = useState(null);
useEffect(() => {
const _dom = document.getElementById("mount-container");
setDom(_dom);
}, []);
return (
<DatePicker
pickerProps= {dom ? {
popupProps: {
portal: () => dom,
},
} : undefined}
/>
)
} 然后就是挂载的节点 <>
<Demo />
<OtherComponents/ >
<View id="mount-container"></View>
</> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
NutUI React 包名
@nutui/nutui-react
NutUI React 版本号
2.6.22
平台
weapp
重现链接
https://codesandbox.io/p/devbox/blissful-panna-4cl8kf?file=%2Fsrc%2FApp.tsx%3A32%2C28
重现步骤
期望的结果是什么?
在当前tabpane正常弹出datepicker或者popup及ActionSheet。
实际的结果是什么?
当前tabpane中datepick不显示且只在首个tabpane中显示。
环境信息
Taro CLI 4.0.6 environment info:
System:
OS: macOS 10.15.7
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 16.20.2 - ~/.volta/tools/image/node/16.20.2/bin/node
Yarn: 3.8.6 - ~/.volta/tools/image/yarn/3.8.6/bin/yarn
npm: 8.19.4 - ~/.volta/tools/image/node/16.20.2/bin/npm
npmPackages:
@tarojs/cli: 4.0.6 => 4.0.6
@tarojs/components: 4.0.6 => 4.0.6
@tarojs/helper: 4.0.6 => 4.0.6
@tarojs/plugin-framework-react: 4.0.6 => 4.0.6
@tarojs/plugin-html: 4.0.6 => 4.0.6
@tarojs/plugin-platform-alipay: 4.0.6 => 4.0.6
@tarojs/plugin-platform-h5: 4.0.6 => 4.0.6
@tarojs/plugin-platform-jd: 4.0.6 => 4.0.6
@tarojs/plugin-platform-qq: 4.0.6 => 4.0.6
@tarojs/plugin-platform-swan: 4.0.6 => 4.0.6
@tarojs/plugin-platform-tt: 4.0.6 => 4.0.6
@tarojs/plugin-platform-weapp: 4.0.6 => 4.0.6
@tarojs/react: 4.0.6 => 4.0.6
@tarojs/runtime: 4.0.6 => 4.0.6
@tarojs/shared: 4.0.6 => 4.0.6
@tarojs/taro: 4.0.6 => 4.0.6
@tarojs/taro-loader: 4.0.6 => 4.0.6
@tarojs/webpack5-runner: 4.0.6 => 4.0.6
babel-preset-taro: 4.0.6 => 4.0.6
eslint-config-taro: 4.0.6 => 4.0.6
react: ^18.0.0 => 18.3.1
其他补充信息
No response
The text was updated successfully, but these errors were encountered: