mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-20 07:14:23 +00:00
fix
This commit is contained in:
parent
5b0d030367
commit
31ac73238e
@ -48,5 +48,9 @@
|
|||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.0.0"
|
"node": ">=10.0.0"
|
||||||
|
},
|
||||||
|
"tnpm": {
|
||||||
|
"mode": "yarn",
|
||||||
|
"lockfile": "enable"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"entry": {
|
"entry": {
|
||||||
"index": "src/index.ts",
|
|
||||||
"editor-preset-vision": "../editor-preset-vision/src/index.ts",
|
"editor-preset-vision": "../editor-preset-vision/src/index.ts",
|
||||||
"react-simulator-renderer": "../react-simulator-renderer/src/index.ts"
|
"react-simulator-renderer": "../react-simulator-renderer/src/index.ts"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -9,6 +9,9 @@ import './title.less';
|
|||||||
export class Title extends Component<{ title: TitleContent; className?: string; onClick?: () => void }> {
|
export class Title extends Component<{ title: TitleContent; className?: string; onClick?: () => void }> {
|
||||||
render() {
|
render() {
|
||||||
let { title, className, onClick } = this.props;
|
let { title, className, onClick } = this.props;
|
||||||
|
if (title == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
if (isValidElement(title)) {
|
if (isValidElement(title)) {
|
||||||
return title;
|
return title;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,6 +41,34 @@ export class Trunk {
|
|||||||
return this.metaBundle.getFromMeta(name);
|
return this.metaBundle.getFromMeta(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
listByCategory() {
|
||||||
|
const categories: any[] = [];
|
||||||
|
const categoryMap: any = {};
|
||||||
|
const categoryItems: any[] = [];
|
||||||
|
const defaultCategory = {
|
||||||
|
items: categoryItems,
|
||||||
|
name: '*',
|
||||||
|
};
|
||||||
|
categories.push(defaultCategory);
|
||||||
|
categoryMap['*'] = defaultCategory;
|
||||||
|
this.getList().forEach((prototype) => {
|
||||||
|
const cat = prototype.getCategory();
|
||||||
|
if (!cat) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!categoryMap.hasOwnProperty(cat)) {
|
||||||
|
const categoryMapItems: any[] = [];
|
||||||
|
categoryMap[cat] = {
|
||||||
|
items: categoryMapItems,
|
||||||
|
name: cat,
|
||||||
|
};
|
||||||
|
categories.push(categoryMap[cat]);
|
||||||
|
}
|
||||||
|
categoryMap[cat].items.push(prototype);
|
||||||
|
});
|
||||||
|
return categories;
|
||||||
|
}
|
||||||
|
|
||||||
getPrototypeView(componentName: string) {
|
getPrototypeView(componentName: string) {
|
||||||
return this.getPrototype(componentName)?.getView();
|
return this.getPrototype(componentName)?.getView();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,6 +29,7 @@ const pages = Object.assign(project, {
|
|||||||
componentsTree: pages[0].componentsTree,
|
componentsTree: pages[0].componentsTree,
|
||||||
}, true);
|
}, true);
|
||||||
},
|
},
|
||||||
|
// FIXME:
|
||||||
addPage(data: OldPageData) {
|
addPage(data: OldPageData) {
|
||||||
return project.open(data.layout);
|
return project.open(data.layout);
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
#lerna run build --stream
|
lerna run build --stream
|
||||||
cp -R ./packages/react-simulator-renderer/dist/* ./packages/editor-preset-general/dist
|
cp -R ./packages/react-simulator-renderer/dist/* ./packages/editor-preset-general/dist
|
||||||
cp -R ./packages/react-simulator-renderer/dist/* ./packages/editor-preset-vision/dist
|
cp -R ./packages/react-simulator-renderer/dist/* ./packages/editor-preset-vision/dist
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user