Commit 59ad82442bf213bac547940086ff4e14d0cd342a

Authored by vben
1 parent de1f0062

fix(table): fix table setting error

CHANGELOG.zh_CN.md
@@ -29,6 +29,7 @@ @@ -29,6 +29,7 @@
29 - 修复表格 i18n 错误 29 - 修复表格 i18n 错误
30 - 修复菜单图标大小不一致 30 - 修复菜单图标大小不一致
31 - 修复顶部菜单宽度计算问题 31 - 修复顶部菜单宽度计算问题
  32 +- 修复表格 tabSetting 问题
32 33
33 ## 2.0.0-rc.12 (2020-11-30) 34 ## 2.0.0-rc.12 (2020-11-30)
34 35
src/components/Table/src/components/TableSetting.vue
@@ -158,8 +158,9 @@ @@ -158,8 +158,9 @@
158 value: (item.dataIndex || item.title) as string, 158 value: (item.dataIndex || item.title) as string,
159 }); 159 });
160 }); 160 });
161 -  
162 - plainOptions.value = ret; 161 + if (!plainOptions.value.length) {
  162 + plainOptions.value = ret;
  163 + }
163 const checkList = table 164 const checkList = table
164 .getColumns() 165 .getColumns()
165 .map((item) => item.dataIndex || item.title) as string[]; 166 .map((item) => item.dataIndex || item.title) as string[];
src/router/constant.ts
@@ -25,11 +25,23 @@ export const getParentLayout = (name: string) => { @@ -25,11 +25,23 @@ export const getParentLayout = (name: string) => {
25 export const PAGE_NOT_FOUND_ROUTE: AppRouteRecordRaw = { 25 export const PAGE_NOT_FOUND_ROUTE: AppRouteRecordRaw = {
26 path: '/:path(.*)*', 26 path: '/:path(.*)*',
27 name: 'ErrorPage', 27 name: 'ErrorPage',
28 - component: EXCEPTION_COMPONENT, 28 + redirect: '/error/404',
  29 + component: LAYOUT,
29 meta: { 30 meta: {
30 title: 'ErrorPage', 31 title: 'ErrorPage',
31 hideBreadcrumb: true, 32 hideBreadcrumb: true,
32 }, 33 },
  34 + children: [
  35 + {
  36 + path: '/error/404',
  37 + name: 'ErrorPage',
  38 + component: EXCEPTION_COMPONENT,
  39 + meta: {
  40 + title: 'ErrorPage',
  41 + hideBreadcrumb: true,
  42 + },
  43 + },
  44 + ],
33 }; 45 };
34 46
35 export const REDIRECT_NAME = 'Redirect'; 47 export const REDIRECT_NAME = 'Redirect';