|
@@ -204,6 +204,7 @@ export default {
|
|
|
* @param {string} mark 选项标识
|
|
|
*/
|
|
|
mousedown(e, i, j, mark) {
|
|
|
+ if (this.disabled) return;
|
|
|
this.drag = true;
|
|
|
document.body.style.userSelect = 'none'; // 禁止选中文本
|
|
|
this.mouseEvent = { clientX: e.clientX, clientY: e.clientY };
|
|
@@ -217,6 +218,7 @@ export default {
|
|
|
* @param {String} mark 选项标识
|
|
|
*/
|
|
|
mouseup(e, i, j, mark) {
|
|
|
+ if (this.disabled || !this.drag) return;
|
|
|
let { i: curI, j: curJ, mark: curMark } = this.mousePointer;
|
|
|
if (curI === -1 && curJ === -1) return;
|
|
|
if (Math.abs(curJ - j) > 1 || mark === curMark) return;
|
|
@@ -256,6 +258,7 @@ export default {
|
|
|
* @param {String} mark 选项标识
|
|
|
*/
|
|
|
handleClickConnection(e, i, j, mark) {
|
|
|
+ if (this.disabled) return;
|
|
|
let { i: curI, j: curJ, mark: curMark } = this.curConnectionPoint;
|
|
|
// 获取 item-wrapper 元素
|
|
|
let currentNode = e.target;
|