@quansitech/antd-admin 1.1.19 → 1.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Table.js +7 -6
- package/package.json +1 -1
package/dist/components/Table.js
CHANGED
|
@@ -54,7 +54,7 @@ export default function (props) {
|
|
|
54
54
|
_context.next = 10;
|
|
55
55
|
break;
|
|
56
56
|
}
|
|
57
|
-
only = ['dataSource', 'pagination'];
|
|
57
|
+
only = ['dataSource', 'pagination', 'extraRenderValues'];
|
|
58
58
|
if (tabsContext.inTabs) {
|
|
59
59
|
only.push('tabs');
|
|
60
60
|
}
|
|
@@ -67,7 +67,6 @@ export default function (props) {
|
|
|
67
67
|
if (tabsContext.inTabs) {
|
|
68
68
|
props = getValueByPath(props, tabsContext.propsPath);
|
|
69
69
|
}
|
|
70
|
-
console.log(props);
|
|
71
70
|
setDataSource(postData(props.dataSource));
|
|
72
71
|
setPagination(props.pagination);
|
|
73
72
|
},
|
|
@@ -201,17 +200,19 @@ export default function (props) {
|
|
|
201
200
|
searchUrl = window.location.href;
|
|
202
201
|
}
|
|
203
202
|
if (props.defaultSearchValue !== undefined) {
|
|
204
|
-
|
|
203
|
+
var _formRef$current;
|
|
204
|
+
(_formRef$current = formRef.current) === null || _formRef$current === void 0 || _formRef$current.setFieldsValue(props.defaultSearchValue);
|
|
205
205
|
}
|
|
206
206
|
if (!modalContext.inModal) {
|
|
207
207
|
var query = qs.parse(window.location.search.replace(/^\?/, ''));
|
|
208
208
|
if (query && Object.keys(query).length) {
|
|
209
|
+
var _formRef$current2;
|
|
209
210
|
Object.keys(query).forEach(function (key) {
|
|
210
211
|
if (typeof query[key] === 'string') {
|
|
211
212
|
/^\d+$/.test(query[key]) && (query[key] = parseInt(query[key]));
|
|
212
213
|
}
|
|
213
214
|
});
|
|
214
|
-
formRef.current.setFieldsValue(query);
|
|
215
|
+
(_formRef$current2 = formRef.current) === null || _formRef$current2 === void 0 || _formRef$current2.setFieldsValue(query);
|
|
215
216
|
}
|
|
216
217
|
}
|
|
217
218
|
}, []);
|
|
@@ -257,9 +258,9 @@ export default function (props) {
|
|
|
257
258
|
}
|
|
258
259
|
// 是否立即搜索
|
|
259
260
|
if (c.searchOnChange) {
|
|
260
|
-
var _formRef$
|
|
261
|
+
var _formRef$current3;
|
|
261
262
|
// @ts-ignore
|
|
262
|
-
(_formRef$
|
|
263
|
+
(_formRef$current3 = formRef.current) === null || _formRef$current3 === void 0 || _formRef$current3.submit();
|
|
263
264
|
}
|
|
264
265
|
}
|
|
265
266
|
},
|