feat(compiler-vapor/v-bind): globally allowed

This commit is contained in:
三咲智子 Kevin Deng 2023-12-09 23:25:01 +08:00
parent 26308c51eb
commit 341ddf0190
No known key found for this signature in database
GPG Key ID: 69992F2250DFD93E
1 changed files with 2 additions and 1 deletions

View File

@ -30,7 +30,7 @@ import {
IRNodeTypes,
} from './ir'
import { SourceMapGenerator } from 'source-map-js'
import { camelize, isString, makeMap } from '@vue/shared'
import { camelize, isGloballyAllowed, isString, makeMap } from '@vue/shared'
import type { Identifier } from '@babel/types'
// remove when stable
@ -534,6 +534,7 @@ function genExpression(node: IRExpression, context: CodegenContext): void {
!node.content.trim() ||
// there was a parsing error
ast === false ||
isGloballyAllowed(rawExpr) ||
isLiteralWhitelisted(rawExpr)
) {
return push(rawExpr, NewlineType.None, loc)