vuejs / rfcs

RFCs for substantial changes / feature additions to Vue core
4.86k stars 548 forks source link

[Amendment] add `created` custom element hook #203

Closed yyx990803 closed 4 years ago

yyx990803 commented 4 years ago

Adds a new custom directive hook: created.

The created hook is called before the vnode's props are applied. This is useful in cases where the directive need to attach event listeners before vnode prop or template listeners, or it intentionally want its DOM mutations to take a lower priority than vnode props.

/cc @vuejs/docs

yyx990803 commented 4 years ago

Relevant commit in core: https://github.com/vuejs/vue-next/commit/11804fe93f66d43320498bfea564af1c9f7a9eb7