mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-13 01:21:58 +00:00
fix: 兼容原来 prototype 的 componentName/view
This commit is contained in:
parent
c69f5fac43
commit
d542a404ce
@ -220,6 +220,11 @@ class Prototype {
|
||||
readonly isPrototype = true;
|
||||
readonly meta: ComponentMeta;
|
||||
readonly options: OldPrototypeConfig | ComponentMetadata;
|
||||
view: ComponentType;
|
||||
// componentName: string;
|
||||
get componentName() {
|
||||
return this.getId();
|
||||
}
|
||||
get packageName() {
|
||||
return this.meta.npm?.package;
|
||||
}
|
||||
@ -322,6 +327,7 @@ class Prototype {
|
||||
}
|
||||
|
||||
setView(view: ComponentType<any>) {
|
||||
this.view = view;
|
||||
const metadata = this.meta.getMetadata();
|
||||
if (!metadata.experimental) {
|
||||
metadata.experimental = {
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
import { ReactElement, ComponentType } from 'react';
|
||||
import { EventEmitter } from 'events';
|
||||
import { registerSetter, RegisteredSetter, getSetter } from '@ali/lowcode-editor-core';
|
||||
import Bundle from './bundle';
|
||||
import lg from '@ali/vu-logger';
|
||||
import { CustomView } from '@ali/lowcode-types';
|
||||
import Bundle from './bundle';
|
||||
import Prototype from './prototype';
|
||||
|
||||
export class Trunk {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user