vueComponent / ant-design-vue

🌈 An enterprise-class UI components based on Ant Design and Vue. 🐜
https://antdv.com/
Other
20.02k stars 3.77k forks source link

Select and TreeSelect cannot be selected when use custom prefixCls #5023

Closed wishong closed 2 years ago

wishong commented 2 years ago

Version

3.0.0-alpha.15

Environment

3.0.0-alpha.15

Reproduction link

https://github.com/vueComponent/ant-design-vue

Steps to reproduce

使用Select和TreeSelect

What is expected?

无法选择

What is actually happening?

版本回退到3.0.0-alpha.14正常 14

3.0.0-alpha.15选不了 15

tangjinzhou commented 2 years ago

官网示例没问题啊 给个复现吧

wishong commented 2 years ago

官网示例没问题啊 给个复现吧

可以看下这个demo https://github.com/wishong/antd-bug

tangjinzhou commented 2 years ago

自己跑一下了吗 我这没问题

wishong commented 2 years ago

自己跑一下了吗 我这没问题

我和同事的电脑都不行 您可以用别人电脑试一下

wsxe9988 commented 2 years ago

自己跑一下了吗 我这没问题

我和同事的电脑都不行 您可以用别人电脑试一下

你可以提供下出现问题的电脑的操作系统,浏览器类型及版本 供排查问题。

wishong commented 2 years ago

你可以提供下出现问题的电脑的操作系统,浏览器类型及版本 供排查问题。

win10家庭版 chrome 96.0.4664.45

tangjinzhou commented 2 years ago

试着 删除 nodemodules .lock 文件重装试试吧 我没能复现

yandixuan commented 2 years ago

@tangjinzhou 我也是的build完后 nginx跑 .15版本根本不能选 .14版本select 第一次打开就这个问题再打开就好了。本地复现不出来这个问题

yandixuan commented 2 years ago

debug了下第一次open下拉框时渲染的dom,ant-select-dropdown的style属性有个 pointer-events:none; 关闭之后第二次打开这个属性就没了(.14版本) @tangjinzhou

tangjinzhou commented 2 years ago

如果是 build 之后才会有问题,那提交一个包含 build 之后代码的仓库

tangjinzhou commented 2 years ago

你们自定义了动画 ?

yandixuan commented 2 years ago

https://github.com/yandixuan/build-error @tangjinzhou 已经包含build 直接点进去第一个页面的select都无法选择

tangjinzhou commented 2 years ago

https://github.com/yandixuan/build-error @tangjinzhou 已经包含build 直接点进去第一个页面的select都无法选择

你这是用 yarn build:test 构建的吧,组件内部对 test 模式做了特殊处理 😓

tangjinzhou commented 2 years ago

不知道你们是不是同一个原因 @yandixuan @wishong

yandixuan commented 2 years ago

🤣 那我换个mode , thanks for youur reply @tangjinzhou

wishong commented 2 years ago

不知道你们是不是同一个原因 @yandixuan @wishong

我是开发环境就不行了

tangjinzhou commented 2 years ago

是否在 less 自定义了 prefixCls @wishong

wishong commented 2 years ago

是否在 less 自定义了 prefixCls @wishong

是的,定义了。也有可能是这个问题。因为prefixCls也提了好几个issues了

tangjinzhou commented 2 years ago

你给的复现示例并没有反映出这个 配置,方便的话在核实下 https://github.com/wishong/antd-bug 这个仓库能复现选不中问题 ?

wishong commented 2 years ago

你给的复现示例并没有反映出这个 配置,方便的话在核实下 https://github.com/wishong/antd-bug 这个仓库能复现选不中问题 ?

我的demo中是有修改前缀类名的。 刚才又试了一下,真的是prefixCls导致的。删除之后选择都正常了。您可以看一下是否是这个影响到了

transtone commented 2 years ago

debug了下第一次open下拉框时渲染的dom,ant-select-dropdown的style属性有个 pointer-events:none; 关闭之后第二次打开这个属性就没了(.14版本) @tangjinzhou

不仅是ant-select-dropdwon有这个问题,下拉选择都有这个问题。ant-dropdown 也一样会多一个 pointer-events: none; 的样式,导致鼠标移不进去。

IvanRoslov commented 2 years ago

It's very sad that you don't use English. Using the library becomes very difficult. Thanks to Google translator, I realized that I have the same problem, but I didn't understand whether it was a bug or a problem in my implementation.

P.S. If you add a rule to write an issue and discuss in English, it will greatly help developers from other countries. Thank you for your work.

IvanRoslov commented 2 years ago

The problem is in pointer-events: none, I agree with that. All my selects and dropdowns broke down. Rolled back to 3.0.0-alpha.14 everything works well in this version.

I don't use custom prefixCls;

tangjinzhou commented 2 years ago

@IvanRoslov update to 3.0.0-beta.7

IvanRoslov commented 2 years ago

@tangjinzhou Unfortunately, it didn't help. Beta 7 also has this bug.

transtone commented 2 years ago

@IvanRoslov update to 3.0.0-beta.7

无效。 image

transtone commented 2 years ago

It's very sad that you don't use English. Using the library becomes very difficult. Thanks to Google translator, I realized that I have the same problem, but I didn't understand whether it was a bug or a problem in my implementation.

P.S. If you add a rule to write an issue and discuss in English, it will greatly help developers from other countries. Thank you for your work.

也许英语会帮到一些外国人,但就帮不到更多的使用中文的人了。有谷歌翻译不是一样的吗。

tangjinzhou commented 2 years ago

Can someone give me an example by codesandbox to reproduce this issue.

tangjinzhou commented 2 years ago

And you should not use NODE_ENV= test env to deploy or dev site. Maybe is other reason,but you should give me a reproduce demo for debugger it. @transtone @IvanRoslov

IvanRoslov commented 2 years ago

@tangjinzhou

Example https://stackblitz.com/edit/vitejs-vite-ubopey?file=src/App.vue&terminal=dev

transtone commented 2 years ago

still not fix with 3.0.0-beta.9

this css may help:

.ant-popover,
.ant-select-dropdown,
.ant-dropdown {
  pointer-events: initial !important;
}
snecker commented 2 years ago

have the same problem version is 3.0.0-beta.9

transtone commented 2 years ago

@tangjinzhou 3.1.0-rc5 still not fix this problem.

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] commented 1 year ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.