jdf2e / nutui-react

京东风格的移动端 React 组件库 、支持多端小程序(A React UI Toolkit for Mobile Web)
https://nutui.jd.com/react/
919 stars 263 forks source link

Drag 组件报错: _b.getBoundingClientRect is not a function #2548

Closed Nansiai closed 2 months ago

Nansiai commented 3 months ago

NutUI React 包名

@nutui/nutui-react

NutUI React 版本号

2.6.16

平台

weapp

重现链接

重现步骤

引入后就会报错, 且无法正常拖动

期望的结果是什么?

Drag 组件能够正常拖动

实际的结果是什么?

Drag 组件引入后报错, 且无法正常拖动.

微信开发者工具控制台报错信息: TypeError: _b.getBoundingClientRect is not a function at ._node_modules_.pnpm_@nutui+nutui-react-taro@2.6.16_react-dom@18.3.1_react@18.3.1__react@18.3.1_node_modules_@nutui_nutui-react-taro_dist_esm_drag.taro-B_TO4Nnu.js:32 at Generator.next (<anonymous>) at fulfilled (._node_modules_.pnpm_@nutui+nutui-react-taro@2.6.16_react-dom@18.3.1_react@18.3.1__react@18.3.1_node_modules_@nutui_nutui-react-taro_dist_esm_tslib.es6-iWu3F_1J.js:21)(env: macOS,mp,1.06.2405020; lib: 3.5.3)

环境信息

👽 Taro v3.6.30

(node:29267) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. (Use node --trace-deprecation ... to show where the warning was created)

Taro CLI 3.6.30 environment info: System: OS: macOS 14.5 Shell: 5.9 - /bin/zsh Binaries: Node: 21.6.1 - /usr/local/bin/node Yarn: 1.22.21 - /usr/local/bin/yarn npm: 10.2.4 - /usr/local/bin/npm npmPackages: @tarojs/cli: 4.0.4 => 4.0.4 @tarojs/components: 4.0.4 => 4.0.4 @tarojs/helper: 4.0.4 => 4.0.4 @tarojs/plugin-framework-react: 4.0.4 => 4.0.4 @tarojs/plugin-html: 4.0.4 => 4.0.4 @tarojs/plugin-platform-alipay: 4.0.4 => 4.0.4 @tarojs/plugin-platform-h5: 4.0.4 => 4.0.4 @tarojs/plugin-platform-jd: 4.0.4 => 4.0.4 @tarojs/plugin-platform-qq: 4.0.4 => 4.0.4 @tarojs/plugin-platform-swan: 4.0.4 => 4.0.4 @tarojs/plugin-platform-tt: 4.0.4 => 4.0.4 @tarojs/plugin-platform-weapp: 4.0.4 => 4.0.4 @tarojs/react: 4.0.4 => 4.0.4 @tarojs/runtime: 4.0.4 => 4.0.4 @tarojs/shared: 4.0.4 => 4.0.4 @tarojs/taro: 4.0.4 => 4.0.4 @tarojs/taro-loader: 4.0.4 => 4.0.4 @tarojs/webpack5-runner: 4.0.4 => 4.0.4 babel-preset-taro: 4.0.4 => 4.0.4 eslint-config-taro: 4.0.4 => 4.0.4 react: ^18.0.0 => 18.3.1

其他补充信息

No response

github-actions[bot] commented 3 months ago

你好 @Nansiai, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 此处 创建一个 codesandbox 或者提供一个最小化的 GitHub 仓库。请确保选择准确的版本。