Commit 5311f57977e1f6b65fa6c76600d143e9964b1510
1 parent
50e9d827
fix: xTable isList
Showing
1 changed file
with
3 additions
and
2 deletions
yudao-ui-admin-vue3/src/components/XTable/src/XTable.vue
| @@ -120,7 +120,7 @@ const getColumnsConfig = (options: XTableProps) => { | @@ -120,7 +120,7 @@ const getColumnsConfig = (options: XTableProps) => { | ||
| 120 | const getProxyConfig = (options: XTableProps) => { | 120 | const getProxyConfig = (options: XTableProps) => { |
| 121 | const { getListApi, proxyConfig, data, isList } = options | 121 | const { getListApi, proxyConfig, data, isList } = options |
| 122 | if (proxyConfig || data) return | 122 | if (proxyConfig || data) return |
| 123 | - if (getListApi && isFunction(getListApi) && !isList) { | 123 | + if (getListApi && isFunction(getListApi)) { |
| 124 | if (!isList) { | 124 | if (!isList) { |
| 125 | options.proxyConfig = { | 125 | options.proxyConfig = { |
| 126 | seq: true, // 启用动态序号代理(分页之后索引自动计算为当前页的起始序号) | 126 | seq: true, // 启用动态序号代理(分页之后索引自动计算为当前页的起始序号) |
| @@ -194,7 +194,8 @@ const getProxyConfig = (options: XTableProps) => { | @@ -194,7 +194,8 @@ const getProxyConfig = (options: XTableProps) => { | ||
| 194 | 194 | ||
| 195 | // 分页 | 195 | // 分页 |
| 196 | const getPageConfig = (options: XTableProps) => { | 196 | const getPageConfig = (options: XTableProps) => { |
| 197 | - const { pagination, pagerConfig, treeConfig } = options | 197 | + const { pagination, pagerConfig, treeConfig, isList } = options |
| 198 | + if (isList) return | ||
| 198 | if (treeConfig) { | 199 | if (treeConfig) { |
| 199 | options.treeConfig = options.treeConfig | 200 | options.treeConfig = options.treeConfig |
| 200 | return | 201 | return |