Skip to content

Use vue.extend to create a new component, call the method in beforeDestroy, there is no response,it is working in 2.6 #12701

@Ch2x

Description

@Ch2x

Version

2.7.8

Reproduction link

codepen.io/Ch2x/pen/VwXMbJm

Steps to reproduce

1.Use Vue.extend to create a new component Notify.
2.call Notify() to show blue square in mounted method
3.call close() to hide blue square in beforeDetroy method,but it doesn't work

What is expected?

The blue square can be closed in beforeDestroy.

What is actually happening?

The blue square still show when call beforeDestroy method.


Because I use element-ui's Notification component, its implementation is similar to the above, it cannot be closed in beforeDestroy, or even onbeforeUnmount in setup syntax. Also, the onBeforeUpdate is able to close.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions