diff --git a/templates/index.html b/templates/index.html index cb94012..7748803 100644 --- a/templates/index.html +++ b/templates/index.html @@ -37,7 +37,7 @@ - @@ -236,6 +236,14 @@ } }); }, + watch: { + code: function (code) { + if (code.length === 5) { + this.inout_disable = true; + this.getFile(); + } + } + }, methods: { http: function (method, url, data = {}, config = {}) { return new Promise((resolve, reject) => { @@ -274,10 +282,9 @@ if (this.code.length < 5) { this.code += value; } - if (this.code.length === 5) { - this.inout_disable = true; - this.getFile(); - } + }, + changeInput: function (value) { + this.code = value; }, toUploadData: function () { if (this.uploadData.text === '' && this.uploadData.file === null) {