temp: 暂存

This commit is contained in:
2024-09-27 17:53:43 +08:00
parent 482c63bab2
commit cfdf2ba00d
14 changed files with 998 additions and 5 deletions

View File

@@ -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}`);

View File

@@ -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;
});