Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
vue-flow-editor
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2023-11-17 18:18:25 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0396ab0c2fe28589e8942e90cbd40ecfe6af55c1
0396ab0c
1 parent
abcc8106
测试新增节点后动态更新ID
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
doc/App.vue
doc/App.vue
View file @
0396ab0
...
...
@@ -973,10 +973,11 @@ export default {
*/
function handleAfterAdd(model: myObj, type: string) {
// console.log('handleAfterAdd', model);
// TODO: 因为resize会重新绘制,所以可能需要保存操作
if (type === 'node') {
console.log(`新增节点`)
// TODO: 测试更新ID
model.id = String(new Date().getTime());
editor.updateModel(model);
}
if (type === 'edge') {
console.log(`新增连接线`)
...
...
Please
register
or
login
to post a comment