refactor: only rewrite css varaiable in <style scoped> when vars is present

This commit is contained in:
Evan You
2020-07-10 17:10:48 -04:00
parent f3cc41f0c8
commit 73bfce3706
5 changed files with 66 additions and 44 deletions

View File

@@ -174,7 +174,7 @@ export function compileScript(
}
// 2. check <script setup="xxx"> function signature
const setupValue = scriptSetup.attrs.setup
const setupValue = scriptSetup.setup
const hasExplicitSignature = typeof setupValue === 'string'
let propsVar: string | undefined