-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Modal.confirm() 点击取消无法关闭 #7375
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
Comments
排查依赖版本后发现使用 vue 3.4 会出现此问题,vue 降级至 3.3.x 功能正常 |
Maybe: You can ... import { createVNode, render } from 'vue'
import { ExclamationCircleOutlined } from '@ant-design/icons-vue'
import ConfirmDialog from 'ant-design-vue/es/modal/ConfirmDialog'
const showConfirm = () => {
const element = document.createDocumentFragment() as any
const dialog = createVNode(ConfirmDialog, {
type: 'confirm',
visible: true,
prefixCls: 'ant-modal',
rootPrefixCls: 'ant',
contentPrefixCls: 'ant-modal-confirm',
icon: createVNode(ExclamationCircleOutlined),
title: '是否确认删除该菜单?',
content: '删除菜单会导致相关页面丢失,请慎重考虑!',
okText: '删除',
okType: 'danger',
onCancel: () => { dialog.component!.props.visible = false },
onOk: () => {
// do some thing
dialog.component!.props.visible = false
}
})
render(dialog, element)
} |
我就是3.3.4。。 |
i downgrade but it is still the same. this is not because of the vue 3.3.4 version |
我也遇到了 |
@kjlamuro Maybe, helpful
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
3.2.20
Environment
OS: MacOS 14.2.1
Browser: Chrome 122.0.6261.57
Vue: 3.4.14
Reproduction link
Steps to reproduce
直接使用 3.2.20 文档上 Modal.confirm 的 codesandbox 可复现
What is expected?
点击取消按钮可以正常关闭模态框
What is actually happening?
Modal.confirm 点击取消按钮无反应
The text was updated successfully, but these errors were encountered: