mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-18 21:38:14 +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 isPrototype = true;
|
||||||
readonly meta: ComponentMeta;
|
readonly meta: ComponentMeta;
|
||||||
readonly options: OldPrototypeConfig | ComponentMetadata;
|
readonly options: OldPrototypeConfig | ComponentMetadata;
|
||||||
|
view: ComponentType;
|
||||||
|
// componentName: string;
|
||||||
|
get componentName() {
|
||||||
|
return this.getId();
|
||||||
|
}
|
||||||
get packageName() {
|
get packageName() {
|
||||||
return this.meta.npm?.package;
|
return this.meta.npm?.package;
|
||||||
}
|
}
|
||||||
@ -322,6 +327,7 @@ class Prototype {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setView(view: ComponentType<any>) {
|
setView(view: ComponentType<any>) {
|
||||||
|
this.view = view;
|
||||||
const metadata = this.meta.getMetadata();
|
const metadata = this.meta.getMetadata();
|
||||||
if (!metadata.experimental) {
|
if (!metadata.experimental) {
|
||||||
metadata.experimental = {
|
metadata.experimental = {
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
import { ReactElement, ComponentType } from 'react';
|
import { ReactElement, ComponentType } from 'react';
|
||||||
import { EventEmitter } from 'events';
|
import { EventEmitter } from 'events';
|
||||||
import { registerSetter, RegisteredSetter, getSetter } from '@ali/lowcode-editor-core';
|
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 { CustomView } from '@ali/lowcode-types';
|
||||||
|
import Bundle from './bundle';
|
||||||
import Prototype from './prototype';
|
import Prototype from './prototype';
|
||||||
|
|
||||||
export class Trunk {
|
export class Trunk {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user