From 6e3abc86058f967bcf6fad94c62572989d4dbcbc Mon Sep 17 00:00:00 2001 From: Evan You Date: Fri, 30 Oct 2020 16:56:12 -0400 Subject: [PATCH] fix(compiler-sfc): fix script setup ts helpers --- packages/compiler-sfc/src/compileScript.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/compiler-sfc/src/compileScript.ts b/packages/compiler-sfc/src/compileScript.ts index 9b93717c..7ba32b85 100644 --- a/packages/compiler-sfc/src/compileScript.ts +++ b/packages/compiler-sfc/src/compileScript.ts @@ -358,7 +358,7 @@ export function compileScript( let propsType = `{}` let emitType = `(e: string, ...args: any[]) => void` - let slotsType = `__Slots__` + let slotsType = `Slots` let attrsType = `Record` let propsASTNode @@ -662,7 +662,7 @@ export function compileScript( // 7. finalize setup argument signature. let args = `` if (isTS) { - if (slotsType === '__Slots__') { + if (slotsType === 'Slots') { helperImports.add('Slots') } const ctxType = `{ @@ -726,7 +726,7 @@ export function compileScript( const runtimeProps = genRuntimeProps(typeDeclaredProps) const runtimeEmits = genRuntimeEmits(typeDeclaredEmits) s.append( - `export default __defineComponent__({${def}${runtimeProps}${runtimeEmits}\n setup\n})` + `export default defineComponent({${def}${runtimeProps}${runtimeEmits}\n setup\n})` ) } else { if (defaultExport) {