refactor: rename vnode hooks

So that they can be used as @vnodeMounted="..." in templates
This commit is contained in:
Evan You
2019-10-18 14:01:45 -04:00
parent 3cd2f7e68e
commit b5194b16bf
4 changed files with 16 additions and 17 deletions

View File

@@ -84,7 +84,7 @@ function applyDirective(
for (const key in directive) {
const hook = directive[key as keyof ObjectDirective]!
const hookKey = `vnode` + key[0].toUpperCase() + key.slice(1)
const hookKey = `onVnode` + key[0].toUpperCase() + key.slice(1)
const vnodeHook = (vnode: VNode, prevVNode: VNode | null) => {
let oldValue
if (prevVNode != null) {