✨ feat: 扫码后直接自动提交
This commit is contained in:
@@ -147,6 +147,7 @@ export default {
|
|||||||
duration: 1500
|
duration: 1500
|
||||||
});
|
});
|
||||||
// 解析成功后禁用输入框
|
// 解析成功后禁用输入框
|
||||||
|
this.handleSubmit();
|
||||||
// this.$refs.textarea.disabled = true;
|
// this.$refs.textarea.disabled = true;
|
||||||
console.log(this.$refs.textarea.disabled, '禁用输入框');
|
console.log(this.$refs.textarea.disabled, '禁用输入框');
|
||||||
} else {
|
} else {
|
||||||
@@ -184,8 +185,6 @@ export default {
|
|||||||
message: '操作成功',
|
message: '操作成功',
|
||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
// 提交成功后重置表单,方便下一次操作
|
|
||||||
this.handleReset();
|
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
this.$message.error({
|
this.$message.error({
|
||||||
@@ -195,6 +194,8 @@ export default {
|
|||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
this.isSubmitting = false;
|
this.isSubmitting = false;
|
||||||
|
// 提交成功后重置表单,方便下一次操作
|
||||||
|
this.handleReset();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleReset() {
|
handleReset() {
|
||||||
|
|||||||
Reference in New Issue
Block a user