wip: is usage compat

This commit is contained in:
Evan You
2021-04-16 11:43:05 -04:00
parent e130c7db23
commit d974adb327
3 changed files with 36 additions and 12 deletions

View File

@@ -240,8 +240,11 @@ export function resolveComponentType(
if (!isExplicitDynamic && isProp.type === NodeTypes.ATTRIBUTE) {
// <button is="vue:xxx">
// if not <component>, only is value that starts with "vue:" will be
// treated as component by the parse phase and reach here.
tag = isProp.value!.content.slice(4)
// treated as component by the parse phase and reach here, unless it's
// compat mode where all is values are considered components
tag = __COMPAT__
? isProp.value!.content.replace(/^vue:/, '')
: isProp.value!.content.slice(4)
} else {
const exp =
isProp.type === NodeTypes.ATTRIBUTE