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

@@ -52,9 +52,8 @@ export const toTypeString = (value: unknown): string =>
export const isPlainObject = (val: any): val is object =>
toTypeString(val) === '[object Object]'
const vnodeHooksRE = /^vnode/
export const isReservedProp = (key: string): boolean =>
key === 'key' || key === 'ref' || key === '$once' || vnodeHooksRE.test(key)
key === 'key' || key === 'ref' || key === '$once' || key.startsWith(`onVnode`)
const camelizeRE = /-(\w)/g
export const camelize = (str: string): string => {