Commit 4760197 1 parent 17eef97 commit 4760197 Copy full SHA for 4760197
File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,9 @@ export function parseJavascript(
53
53
const importDeclarationMap : {
54
54
[ key : string ] : string
55
55
} = { }
56
+ const importOriginNameMap : {
57
+ [ key : string ] : string
58
+ } = { }
56
59
const vueComponentVisitor = {
57
60
Decorator ( path : NodePath < bt . Decorator > ) : void {
58
61
if (
@@ -549,6 +552,11 @@ export function parseJavascript(
549
552
const sourcePath = rootPath . node . source . value
550
553
const specifiers = rootPath . node . specifiers
551
554
specifiers . map ( item => {
555
+ if ( item . type === 'ImportSpecifier' ) {
556
+ importOriginNameMap [ item . local . name ] = item . imported ? item . imported . name : item . local . name
557
+ } else {
558
+ importOriginNameMap [ item . local . name ] = item . local . name
559
+ }
552
560
importDeclarationMap [ item . local . name ] = sourcePath
553
561
} )
554
562
} ,
@@ -571,7 +579,7 @@ export function parseJavascript(
571
579
}
572
580
}
573
581
if ( isHelpCreate ) {
574
- _helpCreateName = callee . name
582
+ _helpCreateName = importOriginNameMap [ callee . name ]
575
583
}
576
584
} ,
577
585
VariableDeclaration ( rootPath : NodePath < bt . VariableDeclaration > ) {
You can’t perform that action at this time.
0 commit comments