Open StarBridgeYoung opened 8 months ago
兄弟,我也一样
已经解决了,依赖包版本调整的原因,可以把之前版本的依赖包的版本覆盖现在的版本即可
PS: it happened in vue3.4
到底怎么搞啊,打包后就一直关闭不了
将vue的版本锁死在vue3.3.x
鉴于大家都有这个问题,我把我的解决方案提供下。具体的文件放在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会自动更新不匹配的部分
我遇到的情况是因为添加了两个依赖,
"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",
看下node_modules里面vue版本是不是3.4.x,如果是就装回3.3.x就行了
有效3.4不兼容3.2.20版本,需要把vue限制在3.4以下
@tangjinzhou 重新安装依赖之后,modal.confirm就关闭不掉了
@tangjinzhou 重新安装依赖之后,modal.confirm就关闭不掉了
你要锁定你的本地的vue版本在3.4以下就可以解决这个问题
感谢,降了版本之后好了
降版本后有没有遇到在执行 yarn type-check
的时候报出很多错误? 原本没有的错误?
我也想问,什么时候能支持 3.4 ,锁死3.3.x 后,3.4以后的新特性就没法使用了
我也想问,什么时候能支持 3.4 ,锁死3.3.x 后,3.4以后的新特性就没法使用了
4天前已经已支持了, 更新最新的antdv就可以了.
我也想问,什么时候能支持 3.4 ,锁死3.3.x 后,3.4以后的新特性就没法使用了
4天前已经已支持了, 更新最新的antdv就可以了.
可是现在最新的3版本的antdv 还是3.3.20呀 ,并没有升级版本
vue:3.2.33, ant-design-vue:3.2.0,但是还是关不掉,你们是怎么解决的?
vue:3.2.33, ant-design-vue:3.2.0,但是还是关不掉,你们是怎么解决的?
试试 vue: 3.2.41 ant-design-vue: 3.2.16 vite: 3.2.3
vue ^3.4.14 和ant-design-vue 4.x Modal.confirm无法关闭
"vue": "^3.3.6", "ant-design-vue": "^3.2.15", Modal.confirm无法关闭
Reference i
也不行,我用同时的node_modules就可以,然后他删了重新装也不行
Reference i
也不行,我用同时的node_modules就可以,然后他删了重新装也不行
请锁定版本号再重新装
"ant-design-vue": "^3.2.20", "vue": "^3.3.4", 实测没问题
mark , vue 3.4.31 ant-design-vue 3.3.0-beta.4
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
@aibayanyu20 同求,什么时候可以解决下3.4兼容antV3的问题,锁死3.3.x 后,3.4以后的vue新特性就没法使用了
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?
弹窗无法关闭