diff --git a/src/renderers/CRUD.tsx b/src/renderers/CRUD.tsx index 068060eb9..4be2d1d77 100644 --- a/src/renderers/CRUD.tsx +++ b/src/renderers/CRUD.tsx @@ -168,7 +168,7 @@ export default class CRUD extends React.Component { if (syncLocation && location && (location.query || location.search)) { store.updateQuery( - location.query || qs.parse(location.search.substring(1)), + qs.parse(location.search.substring(1)), undefined, pageField, perPageField @@ -218,7 +218,7 @@ export default class CRUD extends React.Component { if (props.syncLocation && props.location && props.location.search !== nextProps.location.search) { // 同步地址栏,那么直接检测 query 是否变了,变了就重新拉数据 store.updateQuery( - nextProps.location.query || qs.parse(nextProps.location.search.substring(1)), + qs.parse(nextProps.location.search.substring(1)), undefined, nextProps.pageField, nextProps.perPageField @@ -413,6 +413,7 @@ export default class CRUD extends React.Component { search: boolean = true ) { const {store, syncLocation, env, pageField, perPageField} = this.props; + values = syncLocation ? qs.parse(qs.stringify(values)) : values; store.updateQuery( { diff --git a/src/renderers/Table.tsx b/src/renderers/Table.tsx index 47277ee13..4e84dc971 100644 --- a/src/renderers/Table.tsx +++ b/src/renderers/Table.tsx @@ -1322,7 +1322,7 @@ export default class Table extends React.Component {
{render('header', header, { ...(editable === false ? otherProps : null), - ata: store.getData(data) + data: store.getData(data) })}
) : null; diff --git a/src/store/crud.ts b/src/store/crud.ts index d17e1c0a9..ac48600d2 100644 --- a/src/store/crud.ts +++ b/src/store/crud.ts @@ -91,7 +91,7 @@ export const CRUDStore = ServiceStore.named('CRUDStore') updater && isObjectShallowModified(originQuery, self.query, false) && - setTimeout(() => updater(`?${qs.stringify(self.query)}`), 4); + setTimeout(() => updater(`?${qs.stringify(self.query, { encodeValuesOnly: true })}`), 4); } const fetchInitData: ( diff --git a/src/store/table.ts b/src/store/table.ts index 3e9052ef3..ee6eba86e 100644 --- a/src/store/table.ts +++ b/src/store/table.ts @@ -263,7 +263,7 @@ export const TableStore = iRendererStore return createObject(superData, { items: self.rows.map(item => item.data), selectedItems: self.selectedRows.map(item => item.data), - unSeelctedItems: getUnSelectedRows().map(item => item.data) + unSelectedItems: getUnSelectedRows().map(item => item.data) }); }