feat(compiler): ensure interpolation expressions are wrapped with toString()

This commit is contained in:
Evan You
2019-09-23 15:36:30 -04:00
parent e09e887219
commit b3b67b8c7d
23 changed files with 148 additions and 50 deletions

View File

@@ -9,7 +9,8 @@ import {
isArray,
isObject,
isReservedProp,
hasOwn
hasOwn,
toTypeString
} from '@vue/shared'
import { warn } from './warning'
import { Data, ComponentInternalInstance } from './component'
@@ -374,7 +375,7 @@ function styleValue(value: any, type: string): string {
}
function toRawType(value: any): string {
return Object.prototype.toString.call(value).slice(8, -1)
return toTypeString(value).slice(8, -1)
}
function isExplicable(type: string): boolean {