为什么 Ant Design Vue 中的 Modal 的 afterClose 属性不起作用?有什么其他可能的方案可以在 Modal 关闭后执行额外的操作?
技术性解答: Ant Design Vue 的 Modal 组件中的 afterClose 属性是用来设置 Modal 关闭后的回调函数的,该回调函数会在 Modal 完全关闭后执行。如果该属性无效,可能的原因包括:
如果 afterClose 属性无效,可以考虑以下解决方案:
例如,可以通过在 Modal 组件中添加 destroyed 生命周期钩子函数,在组件销毁时执行关闭后的操作:
Modal Content