vueComponent / ant-design-vue

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

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

Open StarBridgeYoung opened 8 months ago

StarBridgeYoung commented 8 months ago

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 commented 8 months ago

兄弟,我也一样

StarBridgeYoung commented 8 months ago

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

gaokun commented 8 months ago

PS: it happened in vue3.4

aibayanyu20 commented 8 months ago

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

aibayanyu20 commented 8 months ago

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

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

StarBridgeYoung commented 8 months ago

鉴于大家都有这个问题,我把我的解决方案提供下。具体的文件放在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 commented 8 months ago

我遇到的情况是因为添加了两个依赖, "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 commented 8 months ago

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

AKclown commented 8 months ago

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

travel-cloud-wonderland commented 8 months ago

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

AKclown commented 8 months ago

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

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

travel-cloud-wonderland commented 8 months ago

感谢,降了版本之后好了

kunjiang commented 8 months ago

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

jack-7788 commented 8 months ago

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

LukerSpringtree commented 8 months ago

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

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

jack-7788 commented 8 months ago

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

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

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

yizhigee commented 8 months ago

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

ShiJinlong1997 commented 6 months ago

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 commented 6 months ago

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

AndrewWang0318 commented 5 months ago

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

mouxangithub commented 3 months ago

Reference i

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

jack-7788 commented 3 months ago

Reference i

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

请锁定版本号再重新装

komorebi-cqd commented 3 months ago

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

cumt-robin commented 2 months ago

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

github-actions[bot] commented 2 weeks 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

caomeibuaichibaicai commented 2 weeks ago

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