feat(compiler-core): re-implement v-once to use cache mechanism

This commit is contained in:
Evan You
2019-10-23 17:57:40 -04:00
parent 9291011456
commit af5a8e1154
21 changed files with 388 additions and 95 deletions

View File

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