-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Modal.confirm无法关闭 #7329
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
#7252 等待唐老师合并 |
已经解决了:版本如下 |
You can use 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)
} |
vue 更新到 3.5 也可以了 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
3.2.0
Environment
vue: 3.2.33
Steps to reproduce
Modal.confirm无法关闭
What is expected?
希望可以正常关闭
What is actually happening?
Modal.confirm无法关闭,希望可以正常关闭
The text was updated successfully, but these errors were encountered: