在一個頁面上展示多個頁面內容凰慈,將要修改的部分封裝出來引瀑,用判斷來選擇展示
Warning: Each record in table should have a unique `key` prop,or set `rowKey` to an unique primary key.
按照React 的規(guī)范,所有的組件數(shù)組必須綁定 key玛界。在 Table 中万矾,dataSource和columns里的數(shù)據(jù)值都需要指定key值。對于dataSource默認將每列數(shù)據(jù)的key屬性作為唯一的標識慎框。
如果你的數(shù)據(jù)沒有這個屬性良狈,務必使用rowKey來指定數(shù)據(jù)列的主鍵。若沒有指定笨枯,控制臺會出現(xiàn)以下的提示薪丁,表格組件也會出現(xiàn)各類奇怪的錯誤。
// 比如你的數(shù)據(jù)主鍵是 uidreturn;// 或returnrecord.uid}/>;
dataIndex的值對應data的鍵