temp: 暂存
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import { useConfig } from '@abearxiong/use-config';
|
||||
import { app } from './app.ts';
|
||||
import './route.ts'
|
||||
import './route.ts';
|
||||
const config = useConfig();
|
||||
|
||||
import { app as aiApp } from '@kevisual/ai-lang/src/index.ts';
|
||||
//
|
||||
export { aiApp };
|
||||
export { app };
|
||||
app.listen(config.port, () => {
|
||||
console.log(`server is running at http://localhost:${config.port}`);
|
||||
|
||||
@@ -74,9 +74,25 @@ app
|
||||
const { nodes = [] } = data;
|
||||
let flag = false;
|
||||
const newNodes = nodes.map((item) => {
|
||||
if (item.id === nodeData.id) {
|
||||
const nodeItem = nodeData;
|
||||
if (item.id === nodeItem.id) {
|
||||
flag = true;
|
||||
return nodeData;
|
||||
const { data, ...rest } = nodeItem;
|
||||
const { style, ...restData } = data || {};
|
||||
const newNodeItem = {
|
||||
...item,
|
||||
...rest,
|
||||
data: {
|
||||
...item?.data,
|
||||
...restData,
|
||||
style: {
|
||||
...item?.data?.style,
|
||||
...style,
|
||||
},
|
||||
},
|
||||
};
|
||||
console.log('newNodeItem', newNodeItem);
|
||||
return newNodeItem;
|
||||
}
|
||||
return item;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user