logic-flow / turbo-client Goto Github PK
View Code? Open in Web Editor NEWturbo执行引擎前端项目
turbo执行引擎前端项目
Uncaught (in promise) TypeError: Cannot destructure property 'x' of 'properties' as it is undefined.
at convertFlowElementToNode (turboAdapter.js?t=1693904724052:157:5)
at turboAdapter.js?t=1693904724052:194:20
at Array.forEach ()
at toLogicflowData (turboAdapter.js?t=1693904724052:189:35)
at t2.adapterIn (turboAdapter.js?t=1693904724052:214:15)
at t2.value (logic-flow.js:15:481557)
at Proxy.mounted (FlowChart.vue:15:1)
// 将Turbo元素数据转换为LogicFlow中的Node数据
function convertFlowElementToNode(element) {
const { properties, key, type, bounds } = element;
let {
x, y, text,
} = properties;
if (x === undefined) {
const [{ x: x1, y: y1 }, { x: x2, y: y2 }] = bounds;
x = (x1 + x2) / 2
y = (y1 + y2) / 2
}
const node = {
id: key,
type: TurboTypeMap[type],
x,
y,
text,
properties: {},
};
// 这种转换方式,在自定义属性中不能与excludeProperties中的属性重名,否则将在转换过程中丢失
const excludeProperties = ['x', 'y', 'text'];
Object.keys(element.properties).forEach(property => {
if (excludeProperties.indexOf(property) === -1) {
node.properties[property] = element.properties[property];
}
});
return node;
}
如果遇到将index.html改成jsp页面,然后把其他静态文件复制到staitc中。需要修改vue.config.js中的base参数为/static/
。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.