首页 > TAG信息列表 > pro2.0

antd pro2.0 使用记录三:多个接口调用问题

当多个接口调用,后面的接口需要使用前面接口返回的数据时,我们需要用到 .then()的写法,如下: let _this = this;//接口10,获取数据分组dispatch({ type: 'resourceMonitor/queryHistoryTopMetricsGroup', payload: '49',}).then(function() { //接口4,得到级联框中的所有数据 di

antd pro2.0 使用记录六:与服务端交互(使用原有mock)

1 新建页面 1.1 在 src -> pages ->『新建文件夹』NewPage -> 『新建js文件』NewPage.js 和 『新建less文件』NewPage. 1.2 在 NewPage.js 填入如下代码 /** @Description: 新添加页面,pages/NewPage/NewPage.js*/// 必须引入import React, { PureComponent } from "react";// 引

antd pro2.0 使用记录六:与服务端交互(自建服务)

1. 参考资料 参考ant design pro 参考DvaJs   1 新建页面   1.1 在 src -> pages ->『新建文件夹』NewPage ->『新建js文件』NewPage.js 和 『新建less文件』NewPage.less      1.2 在 NewPage.js 填入如下代码 // 必须引入import React, { PureComponent } from "react";

antd pro2.0 使用记录五:设置代理

设置代理 1.1 在config->config.js->『将82行和88行的注释打开』         proxy: { '/server/api/': { // 代理前缀,请求格式:http://localhost:8000/server/api/资源地址,将所有以/server/api 开头的所有路由都代理到目标地址 target: 'http://www.example.com', //

antd pro2.0 使用记录四:右侧顶部菜单栏+新建页面

主要处理下图部分(主右边模块)设置:  由于 /layouts   全部只是布局相关的,与具体显示内容信息无关            --   / ***.js  提供对应方法            --  /****.less  布局设置 其具体实现在 src/components/GlobalHeader/ RightContent.js 里面: return

antd pro2.0 使用记录七:问题

目录: 列表数据返回 列表数据分页,选中的数据无效 修改 antd 默认样式 页面多表单校验   列表数据返回,选中的数据无效: 后台数据返回的是截取后的单页数据(是指每页返回的数据通过调用后台获取,获取的固定10/20条)时: 会导致搜索、排序等只能对当前页生效。 会导致前页选中的数据无效了