jdf2e / nutui-react

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

Button 中设置 hover-class="none" 不生效 #2456

Open zhangminggeek opened 1 month ago

zhangminggeek commented 1 month ago

NutUI React 包名

@nutui/nutui-react-taro

NutUI React 版本号

2.6.13

平台

weapp

重现链接

https://codesandbox.io/p/sandbox/nutui-react-2x-demo-fg4vxd?file=/src/App.tsx

重现步骤

因为存在以下样式,导致设置 hover-class="none" 不生效

&::before {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background-color: $color-mask;
    border: inherit;
    border-color: $color-mask;
    border-radius: inherit;
    transform: translate(-50%, -50%);
    opacity: 0;
    content: ' ';
  }

期望的结果是什么?

对样式重新设计,使 hover-classhover-stop-propagationhover-start-timehover-stay-time 等属性生效

实际的结果是什么?

hover-classhover-stop-propagationhover-start-timehover-stay-time 等属性均失效

环境信息

Taro CLI 3.6.30 environment info: System: OS: macOS 14.4.1 Shell: 5.9 - /bin/zsh Binaries: Node: 20.9.0 - ~/.nvm/versions/node/v20.9.0/bin/node Yarn: 1.22.21 - ~/.nvm/versions/node/v20.9.0/bin/yarn npm: 10.5.1 - ~/.nvm/versions/node/v20.9.0/bin/npm npmPackages: @tarojs/cli: 3.6.30 => 3.6.30 @tarojs/components: 3.6.30 => 3.6.30 @tarojs/helper: 3.6.30 => 3.6.30 @tarojs/plugin-framework-react: 3.6.30 => 3.6.30 @tarojs/plugin-html: ^3.6.30 => 3.6.30 @tarojs/plugin-platform-alipay: 3.6.30 => 3.6.30 @tarojs/plugin-platform-h5: 3.6.30 => 3.6.30 @tarojs/plugin-platform-jd: 3.6.30 => 3.6.30 @tarojs/plugin-platform-qq: 3.6.30 => 3.6.30 @tarojs/plugin-platform-swan: 3.6.30 => 3.6.30 @tarojs/plugin-platform-tt: 3.6.30 => 3.6.30 @tarojs/plugin-platform-weapp: 3.6.30 => 3.6.30 @tarojs/react: 3.6.30 => 3.6.30 @tarojs/runtime: 3.6.30 => 3.6.30 @tarojs/shared: 3.6.30 => 3.6.30 @tarojs/taro: 3.6.30 => 3.6.30 @tarojs/webpack5-runner: 3.6.30 => 3.6.30 babel-preset-taro: 3.6.30 => 3.6.30 eslint-config-taro: 3.6.30 => 3.6.30 react: ^18.3.1 => 18.3.1

其他补充信息

No response

xiaoyatong commented 1 month ago

好的,我们考虑一下向下兼容。