wip: generate valid v-model and TS code in script setup inline mode

This commit is contained in:
Evan You
2020-11-17 12:42:58 -05:00
parent 6e870f5b30
commit c15bd6235e
6 changed files with 52 additions and 11 deletions

View File

@@ -30,6 +30,7 @@ export const POP_SCOPE_ID = Symbol(__DEV__ ? `popScopeId` : ``)
export const WITH_SCOPE_ID = Symbol(__DEV__ ? `withScopeId` : ``)
export const WITH_CTX = Symbol(__DEV__ ? `withCtx` : ``)
export const UNREF = Symbol(__DEV__ ? `unref` : ``)
export const IS_REF = Symbol(__DEV__ ? `isRef` : ``)
// Name mapping for runtime helpers that need to be imported from 'vue' in
// generated code. Make sure these are correctly exported in the runtime!
@@ -64,7 +65,8 @@ export const helperNameMap: any = {
[POP_SCOPE_ID]: `popScopeId`,
[WITH_SCOPE_ID]: `withScopeId`,
[WITH_CTX]: `withCtx`,
[UNREF]: `unref`
[UNREF]: `unref`,
[IS_REF]: `isRef`
}
export function registerRuntimeHelpers(helpers: any) {