diff --git a/src/jmapNew/keyboardController.js b/src/jmapNew/keyboardController.js index 9cfd0abc9..c8e74c12d 100644 --- a/src/jmapNew/keyboardController.js +++ b/src/jmapNew/keyboardController.js @@ -19,11 +19,11 @@ class KeyboardController extends Eventful { opts = opts || {}; this._keyOnDownUp = opts.keyOnDownUp || true; - window.addEventListener('keydown', keydownHandle, false); + window.addEventListener('keyup', keydownHandle, false); }; this.disable = function () { - window.removeEventListener('keydown', keydownHandle, false); + window.removeEventListener('keyup', keydownHandle, false); }; this.dispose = function() { diff --git a/src/utils/index.js b/src/utils/index.js index 902d58b5f..8b3204716 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -148,7 +148,7 @@ export function deepAssign(obj, item) { const target = item.constructor === Array ? [] : {}; // 判断复制的目标是数组还是对象 for (const keys in item) { if (item.hasOwnProperty(keys) && keys != 'instance') { // instance 对面不拷贝 - if (item[keys] && typeof item[keys] === 'object') { // 如果值是对象,就递归一下 + if (typeof item[keys] === 'object') { // 如果值是对象,就递归一下 target[keys] = item[keys].constructor === Array ? [] : {}; target[keys] = deepClone(item[keys]); } else { diff --git a/src/views/newMap/jlmapNew/index.vue b/src/views/newMap/jlmapNew/index.vue index cc0872745..b91244271 100644 --- a/src/views/newMap/jlmapNew/index.vue +++ b/src/views/newMap/jlmapNew/index.vue @@ -17,7 +17,7 @@
鼠标偏移: - + @@ -276,7 +276,9 @@ export default { break; case 'Delete': this.$store.dispatch('map/setDeleteCount'); break; - case 'Update': this.$store.dispatch('map/setUpdateCount'); + case 'Update': + this.$refs.offsetX.focus(); + this.$store.dispatch('map/setUpdateCount'); break; } }, diff --git a/src/views/newMap/newMapdraft/index.vue b/src/views/newMap/newMapdraft/index.vue index 356481103..84e3e920f 100644 --- a/src/views/newMap/newMapdraft/index.vue +++ b/src/views/newMap/newMapdraft/index.vue @@ -179,7 +179,7 @@ export default { } }, clickEvent(em) { - var device = this.getDeviceByEm(em); + const device = this.getDeviceByEm(em); this.deviceHighLight(this.oldDevice, false); this.deviceHighLight(device, true); this.oldDevice = device; diff --git a/src/views/newMap/newMapdraft/mapoperate/config/list.vue b/src/views/newMap/newMapdraft/mapoperate/config/list.vue index 5030cea55..a188b4f1f 100644 --- a/src/views/newMap/newMapdraft/mapoperate/config/list.vue +++ b/src/views/newMap/newMapdraft/mapoperate/config/list.vue @@ -95,7 +95,7 @@ +