diff --git a/components/table/demo/ajax.md b/components/table/demo/ajax.md index a32adb0d2b..157eb3a7d8 100644 --- a/components/table/demo/ajax.md +++ b/components/table/demo/ajax.md @@ -35,6 +35,7 @@ var dataSource = new Table.DataSource({ resolve: function(result) { return result.data; }, + data: {}, // 和后台接口返回的分页数据进行适配 getPagination: function(result) { return { diff --git a/components/table/index.jsx b/components/table/index.jsx index e3f083947e..2bf60bba8b 100644 --- a/components/table/index.jsx +++ b/components/table/index.jsx @@ -31,7 +31,7 @@ class DataSource { } clone(config = {}) { - return new DataSource(objectAssign(config, this.config)); + return new DataSource(objectAssign({}, this.config, config)); } }