首页 > 其他 > 详细

实战 ant design pro 中的坑

时间:2018-05-02 01:17:31      阅读:978      评论:0      收藏:0      [点我收藏+]

1.前戏:

1,替换mock数据:

1.将:.roadhogrc.mock.js 中的代理模式替换
当不使用代理的时候就会将所有 /api/*的链接换成 http://localhost:8080/
export default noProxy ? {'GET /api/*':'http://localhost:8080/'} : delay(proxy, 1000);
2.启动: 
window:npm run start:no-proxy
其他系统没试

1. what?这是什么鬼没设置key?翻了下案例也没找到key在哪里,https://gist.github.com/xgqfrms-gildata/36be904c705bfe4952122b6d2e63357c 。擦,表格data必须设置key属性。

将服务端返回id改成key。

Warning: Each record in dataSource of table should have a unique `key` prop, or set `rowKey` to an unique primary key,see https://u.ant.design/table-row-key
index.js:2177
Warning: Each record in table should have a unique `key` prop,or set `rowKey` to an unique primary key.

实战 ant design pro 中的坑

原文:https://www.cnblogs.com/subtract/p/8978160.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!