element-plus官网上对于before-close方法的解释是否正确?
element-plus官网上对于before-close方法的解释是否正确?
当done不设置参数或参数设置为true时,终止关闭?应该是继续关闭吧?
const handleClose = (done: () => void) => {
ElMessageBox.confirm('Are you sure you want to close this?')
.then(() => {
done()
})
.catch(() => {
// catch error
})
}
回复
1个回答

test
2024-06-23
放到这里是有误的,不传参数应该是执行关闭。
对于element来说,这个说法是没问题的,可以看出element是参数为false才执行关闭而element-plus是布尔值true终止关闭,布尔值false执行关闭
回复

适合作为回答的
- 经过验证的有效解决办法
- 自己的经验指引,对解决问题有帮助
- 遵循 Markdown 语法排版,代码语义正确
不该作为回答的
- 询问内容细节或回复楼层
- 与题目无关的内容
- “赞”“顶”“同问”“看手册”“解决了没”等毫无意义的内容