webStorm 自定义模板

dispatch – dva dispatch

const { dispatch } = this.props;
dispatch({
  type: '/',
  payload: {},
});

dispatchc – dva dispatch callback

const { dispatch } = this.props;
dispatch({
  type: '/',
  payload: {},
  callback: response => {
    if (response.data) {
      message.success();
    } else {
      message.warning();
    }
  },
});
posted @ 2020-12-30 10:48  ytsee  阅读(35)  评论(0)    收藏  举报