Skip to content
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

【Card】子组件异步emit父组件Card的loading时不生效 #7955

Open
1 task done
liruixiang321 opened this issue Nov 26, 2024 · 3 comments
Open
1 task done

Comments

@liruixiang321
Copy link

liruixiang321 commented Nov 26, 2024

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

4.2.6

Environment

"ant-design-vue": "^3.2.5", "vue": "^3.2.36"

Reproduction link

Edit on CodeSandbox

Steps to reproduce

点击按钮

What is expected?

2秒后loading消失

What is actually happening?

2秒后loading未消失

@liruixiang321
Copy link
Author

liruixiang321 commented Nov 26, 2024

感觉是由于出现loading时内部使用将子组件卸载了,就无法再复原了

@umrsang
Copy link

umrsang commented Nov 27, 2024

loading时子组件被卸载了

@YiMo1
Copy link

YiMo1 commented Nov 27, 2024

子组件被卸载了,所以emit直接return了。

export function emit(
  instance: ComponentInternalInstance,
  event: string,
  ...rawArgs: any[]
): ComponentPublicInstance | null | undefined {
  if (instance.isUnmounted) return

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants