fix: 修复组件面板详情加载不了的 bug

This commit is contained in:
mario.gk 2020-07-17 14:05:52 +08:00
parent 1c0b50869d
commit cca33096d1

View File

@ -219,6 +219,9 @@ class Prototype {
readonly isPrototype = true;
readonly meta: ComponentMeta;
readonly options: OldPrototypeConfig | ComponentMetadata;
get packageName() {
return this.meta.npm?.package;
}
constructor(input: OldPrototypeConfig | ComponentMetadata | ComponentMeta, lookup: boolean = false) {
if (lookup) {
@ -250,7 +253,7 @@ class Prototype {
}
getPackageName() {
return this.meta.npm?.package;
return this.packageName;
}
getContextInfo(name: string): any {