代码拉取完成,页面将自动刷新
版本:v2.5.3
示例页面avue/examples/element-ui/flow/index.html
步骤:
1.点击确认删除“节点B”;
2.将“节点A”连接至“节点C”;
3.连线关系异常,如下图:
注意使用MD语法 日志 使用 ``格式化日志,越多详细越好
vue.js:8542 Download the Vue Devtools extension for a better development experience:
https://github.com/vuejs/vue-devtools
vue.js:8553 You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at https://vuejs.org/guide/deployment.html
avue.js:8693 connectionDetached {connection: b.Connection, source: div#nodeA.jtk-droppable.jtk-managed.jtk-draggable.jtk-endpoint-anchor.jtk-connected, target: div#nodeC.jtk-droppable.jtk-managed.jtk-draggable.jtk-endpoint-anchor.jtk-connected.jtk-dragged, sourceId: "nodeA", targetId: "nodeB", …}
avue.js:8693 connectionDetached {connection: b.Connection, source: div#nodeC.jtk-droppable.jtk-managed.jtk-draggable.jtk-connected.jtk-dragged, target: div#nodeD.jtk-droppable.jtk-managed.jtk-draggable.jtk-endpoint-anchor.jtk-connected, sourceId: "nodeB", targetId: "nodeC", …}
avue.js:8720 beforeDrop {sourceId: "nodeA", targetId: "nodeB", scope: "jsPlumb_DefaultScope", connection: b.Connection, dropEndpoint: b.Endpoint, …}
// 报错日志
jsplumb.min.js:2 cannot check condition [beforeDrop]TypeError: Cannot read property 'lineList' of undefined
avue.js:8680 connection {connection: b.Connection, source: div#nodeA.jtk-droppable.jtk-managed.jtk-draggable.jtk-endpoint-anchor.jtk-connected, target: div#nodeC.jtk-droppable.jtk-managed.jtk-draggable.jtk-dragged.jtk-endpoint-anchor.jtk-connected, sourceId: "nodeA", targetId: "nodeB", …}connection: b.Connection {id: "con_21", connector: b.C…s.<…>.<computed>, idPrefix: "_jsplumb_c_", defaultLabelLocation: 0.5, defaultOverlayKeys: Array(2), …}source: div#nodeA.jtk-droppable.jtk-managed.jtk-draggable.jtk-endpoint-anchor.jtk-connectedsourceEndpoint: b.Endpoint {idPrefix: "_jsplumb_e_", defaultLabelLocation: Array(2), defaultOverlayKeys: Array(2), _listeners: {…}, eventsSuspended: false, …}sourceId: "nodeA"target: div#nodeC.jtk-droppable.jtk-managed.jtk-draggable.jtk-dragged.jtk-endpoint-anchor.jtk-connectedtargetEndpoint: b.Endpoint {idPrefix: "_jsplumb_e_", defaultLabelLocation: Array(2), defaultOverlayKeys: Array(2), _listeners: {…}, eventsSuspended: false, …}targetId: "nodeB"__proto__: Object
连线关系异常,如下图:
这个貌似是jsplumb的bug,解决这个问题的方法就是不删除节点,而是隐藏节点在执行jsPlumb.removeAllEndpoints(stepid)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
这个貌似是jsplumb的bug,解决这个问题的方法就是不删除节点,而是隐藏节点在执行jsPlumb.removeAllEndpoints(stepid)
@whatsup 我看了avue.js的源码是这样的:
//删除节点
deleteNode: function deleteNode(nodeId) {
var _this3 = this;
this.$confirm('确定要删除节点' + nodeId + '?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false
}).then(function () {
_this3.option.nodeList = _this3.option.nodeList.filter(function (node) {
return node.id !== nodeId;
});
_this3.$nextTick(function () {
this.jsPlumb.removeAllEndpoints(nodeId);
});
}).catch(function () {});
return true;
},
这里应该怎么处理?我看了网上其他的jsplumb案例也是这么写的,但是并没有出现avue里的问题。jsplumb版本我也更新了,也是一样。
登录 后才可以发表评论