|
|
|
@ -752,22 +752,6 @@ export default {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
listenerFunction(e) {
|
|
|
|
|
document.addEventListener('DOMContentLoaded', function () {
|
|
|
|
|
|
|
|
|
|
console.log("-----jianting---");
|
|
|
|
|
document.removeEventListener('DOMContentLoaded', arguments.callee, false);
|
|
|
|
|
var inputer = document.getElementById("inputer");
|
|
|
|
|
window.sc = new KeyScaner(inputer);//传入要监听的DOM节点
|
|
|
|
|
sc.onInput = function (text) {
|
|
|
|
|
//onInput事件在检测到回车键按下或在连续输入后超过500ms没有继续输入时触发
|
|
|
|
|
inputer.innerText += (text + "\n");
|
|
|
|
|
console.log("--------" + text);
|
|
|
|
|
// this.formData.code =
|
|
|
|
|
};
|
|
|
|
|
inputer.focus();//别忘了给要监听的节点放置焦点,如果是div一类默认不具备焦点的节点需要给它加上“tabindex”属性。不建议传入document、Body等全局节点,可能会影响其它输入控件的流畅性。
|
|
|
|
|
}, false);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
findStorageMethod(query) {
|
|
|
|
|
if (this.formData.locStorageCode == null)
|
|
|
|
@ -950,7 +934,6 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.listenerFunction();
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|