Commit 5311f57977e1f6b65fa6c76600d143e9964b1510

Authored by xingyu
1 parent 50e9d827

fix: xTable isList

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