fix(sfc/style-vars): improve ignore style variable bindings in comments (#4202)

This commit is contained in:
edison
2021-07-28 22:51:25 +08:00
committed by GitHub
parent 204e194d2b
commit 771635b72a
3 changed files with 17 additions and 8 deletions

View File

@@ -50,11 +50,17 @@ export default __default__"
`;
exports[`CSS vars injection codegen should ignore comments 1`] = `
"export default {
"import { useCssVars as _useCssVars, unref as _unref } from 'vue'
export default {
setup(__props, { expose }) {
expose()
const color = 'red'
return { color }
_useCssVars(_ctx => ({
\\"xxxxxxxx-width\\": (width)
}))
const color = 'red';const width = 100
return { color, width }
}
}"