|
@@ -42,14 +42,7 @@ import {
|
|
|
WITH_MEMO,
|
|
WITH_MEMO,
|
|
|
OPEN_BLOCK
|
|
OPEN_BLOCK
|
|
|
} from './runtimeHelpers'
|
|
} from './runtimeHelpers'
|
|
|
-import {
|
|
|
|
|
- isString,
|
|
|
|
|
- isObject,
|
|
|
|
|
- hyphenate,
|
|
|
|
|
- extend,
|
|
|
|
|
- babelParserDefaultPlugins,
|
|
|
|
|
- NOOP
|
|
|
|
|
-} from '@vue/shared'
|
|
|
|
|
|
|
+import { isString, isObject, hyphenate, extend, NOOP } from '@vue/shared'
|
|
|
import { PropsExpression } from './transforms/transformElement'
|
|
import { PropsExpression } from './transforms/transformElement'
|
|
|
import { parseExpression } from '@babel/parser'
|
|
import { parseExpression } from '@babel/parser'
|
|
|
import { Expression } from '@babel/types'
|
|
import { Expression } from '@babel/types'
|
|
@@ -167,7 +160,7 @@ export const isMemberExpressionNode = __BROWSER__
|
|
|
: (path: string, context: TransformContext): boolean => {
|
|
: (path: string, context: TransformContext): boolean => {
|
|
|
try {
|
|
try {
|
|
|
let ret: Expression = parseExpression(path, {
|
|
let ret: Expression = parseExpression(path, {
|
|
|
- plugins: [...context.expressionPlugins, ...babelParserDefaultPlugins]
|
|
|
|
|
|
|
+ plugins: context.expressionPlugins
|
|
|
})
|
|
})
|
|
|
if (ret.type === 'TSAsExpression' || ret.type === 'TSTypeAssertion') {
|
|
if (ret.type === 'TSAsExpression' || ret.type === 'TSTypeAssertion') {
|
|
|
ret = ret.expression
|
|
ret = ret.expression
|