commit
be462a25d2
|
@ -8,7 +8,7 @@ import {observer} from 'mobx-react';
|
|||
import {ServiceStore, IServiceStore} from '../../store/service';
|
||||
|
||||
@Renderer({
|
||||
test: /(^|\/)form(?:\/.+)?\/control\/(?:\d+\/)?service$/,
|
||||
test: /(^|\/)form\/(.*)\/service$/,
|
||||
weight: -100,
|
||||
storeType: ServiceStore.name,
|
||||
storeExtendsData: false,
|
||||
|
@ -25,7 +25,9 @@ export class ServiceRenderer extends BasicService {
|
|||
componentDidMount() {
|
||||
const {formInited, addHook} = this.props;
|
||||
|
||||
if (formInited) {
|
||||
// form层级下的所有service应该都会走这里
|
||||
// 但是传入props有可能是undefined,所以做个处理
|
||||
if (formInited !== false) {
|
||||
super.componentDidMount();
|
||||
} else {
|
||||
addHook && addHook(this.initFetch, 'init');
|
||||
|
@ -34,7 +36,7 @@ export class ServiceRenderer extends BasicService {
|
|||
|
||||
componentDidUpdate(prevProps: ServiceProps) {
|
||||
const {formInited} = this.props;
|
||||
if (formInited) {
|
||||
if (formInited !== false) {
|
||||
super.componentDidUpdate(prevProps);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue