feat: v-once

Note: only compiler transform is tested - integration with runtime
still needs to be tested.
This commit is contained in:
Evan You
2019-10-09 17:32:58 -04:00
parent 5dfb271551
commit 93c6aa4c90
7 changed files with 63 additions and 13 deletions

View File

@@ -43,7 +43,7 @@ export const isPlainObject = (val: any): val is object =>
const vnodeHooksRE = /^vnode/
export const isReservedProp = (key: string): boolean =>
key === 'key' || key === 'ref' || vnodeHooksRE.test(key)
key === 'key' || key === 'ref' || key === '$once' || vnodeHooksRE.test(key)
const camelizeRE = /-(\w)/g
export const camelize = (str: string): string => {