Service 可以返回数组格式的渲染器
This commit is contained in:
parent
fabdbd98fd
commit
7f9516f38c
|
@ -277,15 +277,14 @@ export const ServiceStore = iRendererStore
|
||||||
const json:Payload = yield (getRoot(self) as IRendererStore).fetcher(api, data, options);
|
const json:Payload = yield (getRoot(self) as IRendererStore).fetcher(api, data, options);
|
||||||
fetchSchemaCancel = null;
|
fetchSchemaCancel = null;
|
||||||
|
|
||||||
if (!isEmpty(json.data)) {
|
|
||||||
self.schema = json.data;
|
|
||||||
self.schemaKey = '' + Date.now();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!json.ok) {
|
if (!json.ok) {
|
||||||
updateMessage(json.msg || options && options.errorMessage || '获取失败,请重试', true);
|
updateMessage(json.msg || options && options.errorMessage || '获取失败,请重试', true);
|
||||||
(getRoot(self) as IRendererStore).notify('error', self.msg);
|
(getRoot(self) as IRendererStore).notify('error', self.msg);
|
||||||
} else {
|
} else {
|
||||||
|
if (json.data) {
|
||||||
|
self.schema = json.data;
|
||||||
|
self.schemaKey = '' + Date.now();
|
||||||
|
}
|
||||||
updateMessage(json.msg || options && options.successMessage);
|
updateMessage(json.msg || options && options.successMessage);
|
||||||
|
|
||||||
// 配置了获取成功提示后提示,默认是空不会提示。
|
// 配置了获取成功提示后提示,默认是空不会提示。
|
||||||
|
|
Loading…
Reference in New Issue