Skip to content

Modal的静态方法打开弹窗无法关闭,之前几周使用时正常,新项目重新安装后,出现该问题 #7257

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

Closed
1 task
StarBridgeYoung opened this issue Jan 9, 2024 · 30 comments
Labels

Comments

@StarBridgeYoung
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

3.2.20

Environment

Vue3

Reproduction link

https://3x.antdv.com/components/modal-cn#API

Steps to reproduce

使用Modal的静态方法调用弹窗,例如Modal.confirm(),无法关闭

What is expected?

正常关闭

What is actually happening?

弹窗无法关闭

@ghost
Copy link

ghost commented Jan 9, 2024

兄弟,我也一样

@StarBridgeYoung
Copy link
Author

已经解决了,依赖包版本调整的原因,可以把之前版本的依赖包的版本覆盖现在的版本即可

@gaokun
Copy link
Contributor

gaokun commented Jan 10, 2024

PS: it happened in vue3.4

@aibayanyu20
Copy link
Member

#7252

@aibayanyu20
Copy link
Member

到底怎么搞啊,打包后就一直关闭不了

将vue的版本锁死在vue3.3.x

@StarBridgeYoung
Copy link
Author

鉴于大家都有这个问题,我把我的解决方案提供下。具体的文件放在https://gitee.com/yxq920925/antd-vue3.-x-fix

作者没有锁死依赖包版本导致的问题,由于依赖包无限嵌套,我没办法排除具体是哪个依赖的包问题,于是我把之前运行正常的项目的yarn.lock文件复制到当前项目,重新yarn install,问题得到解决。

具体步骤:

1.把当前项目的node-modules、yarn.lcok删除

2.yarn install

3.将本仓库的yarn.lock替换当前项目

4.再次yarn install

5.不用担心我的lock会影响到你的项目,yarn会自动更新不匹配的部分

@SJeagery
Copy link

我遇到的情况是因为添加了两个依赖,
"vue-json-pretty": "^2.3.0", "codemirror": "^5.65.3",
添加这两个依赖后启动服务报错,于是删除yarn.lock重装依赖,后能启动服务但就无法关闭Modal.confirm,也许是重装后默认安装了3.4+版本的vue导致的,回退环境就可以解决了

环境配置
"vue": "^3.2.40", "ant-design-vue": "3.2.0",

@XSasami
Copy link

XSasami commented Jan 12, 2024

看下node_modules里面vue版本是不是3.4.x,如果是就装回3.3.x就行了

@AKclown
Copy link

AKclown commented Jan 16, 2024

有效3.4不兼容3.2.20版本,需要把vue限制在3.4以下

@travel-cloud-wonderland

@tangjinzhou 重新安装依赖之后,modal.confirm就关闭不掉了

@AKclown
Copy link

AKclown commented Jan 17, 2024

@tangjinzhou 重新安装依赖之后,modal.confirm就关闭不掉了

你要锁定你的本地的vue版本在3.4以下就可以解决这个问题

@travel-cloud-wonderland

感谢,降了版本之后好了

@kunjiang
Copy link

降版本后有没有遇到在执行 yarn type-check 的时候报出很多错误? 原本没有的错误?

@jack-7788
Copy link

我也想问,什么时候能支持 3.4 ,锁死3.3.x 后,3.4以后的新特性就没法使用了

@LukerSpringtree
Copy link

我也想问,什么时候能支持 3.4 ,锁死3.3.x 后,3.4以后的新特性就没法使用了

4天前已经已支持了, 更新最新的antdv就可以了.

@jack-7788
Copy link

我也想问,什么时候能支持 3.4 ,锁死3.3.x 后,3.4以后的新特性就没法使用了

4天前已经已支持了, 更新最新的antdv就可以了.

可是现在最新的3版本的antdv 还是3.3.20呀 ,并没有升级版本

@yizhigee
Copy link

yizhigee commented Feb 1, 2024

vue:3.2.33, ant-design-vue:3.2.0,但是还是关不掉,你们是怎么解决的?

@ShiJinlong1997
Copy link

vue:3.2.33, ant-design-vue:3.2.0,但是还是关不掉,你们是怎么解决的?

试试
vue: 3.2.41
ant-design-vue: 3.2.16
vite: 3.2.3

@xingxing0804
Copy link

vue ^3.4.14 和ant-design-vue 4.x Modal.confirm无法关闭

@andrewzfoster
Copy link

andrewzfoster commented Apr 29, 2024

"vue": "^3.3.6", "ant-design-vue": "^3.2.15", Modal.confirm无法关闭

@mouxangithub
Copy link

Reference i

也不行,我用同时的node_modules就可以,然后他删了重新装也不行

@jack-7788
Copy link

Reference i

也不行,我用同时的node_modules就可以,然后他删了重新装也不行

请锁定版本号再重新装

@komorebi-cqd
Copy link

"ant-design-vue": "^3.2.20",
"vue": "^3.3.4",
实测没问题

@cumt-robin
Copy link

mark ,
vue 3.4.31
ant-design-vue 3.3.0-beta.4

Copy link

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 github-actions bot added the Stale label Sep 13, 2024
@caomeibuaichibaicai
Copy link

caomeibuaichibaicai commented Sep 13, 2024

@aibayanyu20 同求,什么时候可以解决下3.4兼容antV3的问题,锁死3.3.x 后,3.4以后的vue新特性就没法使用了

@github-actions github-actions bot removed the Stale label Sep 14, 2024
@yangqinmin
Copy link

mark

@MrChenSH
Copy link

MrChenSH commented Nov 1, 2024

如果大家放心的话,可以 使用 我自己基于[email protected] 将bug修改后发版的 , 只需要执行命令 pnpm add ant-design-vue@npm:tmgc-design-vue 即可,兼容vue3.4 及以上,同时依然是[email protected] 的版本内容

您好,能指导下怎么修改源码解决这个问题么

@duoluodexiaoxiaoyuan
Copy link

如果大家放心的话,可以 使用 我自己基于[email protected] 将bug修改后发版的 , 只需要执行命令 pnpm add ant-design-vue@npm:tmgc-design-vue 即可,兼容vue3.4 及以上,同时依然是[email protected] 的版本内容

您好,能指导下怎么修改源码解决这个问题么

老哥会修改源码了嘛,求教

Copy link

github-actions bot commented Jan 6, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests