mirror of https://github.com/vuejs/core.git
feat(compiler-vapor/v-bind): globally allowed
This commit is contained in:
parent
26308c51eb
commit
341ddf0190
|
@ -30,7 +30,7 @@ import {
|
||||||
IRNodeTypes,
|
IRNodeTypes,
|
||||||
} from './ir'
|
} from './ir'
|
||||||
import { SourceMapGenerator } from 'source-map-js'
|
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'
|
import type { Identifier } from '@babel/types'
|
||||||
|
|
||||||
// remove when stable
|
// remove when stable
|
||||||
|
@ -534,6 +534,7 @@ function genExpression(node: IRExpression, context: CodegenContext): void {
|
||||||
!node.content.trim() ||
|
!node.content.trim() ||
|
||||||
// there was a parsing error
|
// there was a parsing error
|
||||||
ast === false ||
|
ast === false ||
|
||||||
|
isGloballyAllowed(rawExpr) ||
|
||||||
isLiteralWhitelisted(rawExpr)
|
isLiteralWhitelisted(rawExpr)
|
||||||
) {
|
) {
|
||||||
return push(rawExpr, NewlineType.None, loc)
|
return push(rawExpr, NewlineType.None, loc)
|
||||||
|
|
Loading…
Reference in New Issue