Commit d91fdba5 authored by antoor's avatar antoor

Add request-timeout's setting ui

添加请求超时设置UI
parent 533280f5
...@@ -41,19 +41,21 @@ class Form { ...@@ -41,19 +41,21 @@ class Form {
// 回调数据 // 回调数据
if (callback) { if (callback) {
win.progressOn(); win.progressOn();
callback(this._parseFormData( setTimeout(() => {
this.baseForm.getValues(), callback(this._parseFormData(
this.httpForm.getValues(), this.baseForm.getValues(),
this.otherForm.getValues() this.httpForm.getValues(),
)).then((msg) => { this.otherForm.getValues()
// 添加/保存完毕后回调 )).then((msg) => {
win.close(); // 添加/保存完毕后回调
toastr.success(msg, LANG_T['success']); win.close();
}).catch((msg) => { toastr.success(msg, LANG_T['success']);
// 添加/保存错误 }).catch((msg) => {
win.progressOff(); // 添加/保存错误
toastr.error(msg, LANG_T['error']); win.progressOff();
}); toastr.error(msg, LANG_T['error']);
});
}, 100);
}; };
}); });
} }
...@@ -280,7 +282,20 @@ class Form { ...@@ -280,7 +282,20 @@ class Form {
}, { }, {
type: "checkbox", name: 'terminal-cache', label: LANG['list']['otherConf']['notermcache'], type: "checkbox", name: 'terminal-cache', label: LANG['list']['otherConf']['notermcache'],
checked: opt['terminal-cache'] === 1 checked: opt['terminal-cache'] === 1
} }, {
type: "label", label: '请求超时'
}, {
type: "combo", label: '/ms', inputWidth: 100, name: "request-timeout", options: [
{
text: "5000", value: "5000"
}, {
text: "10000", value: "10000", selected: true
}, {
text: "30000", value: "30000"
}, {
text: "60000", value: "60000"
}
]},
]}], true); ]}], true);
return form; return form;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment