File tree Expand file tree Collapse file tree 4 files changed +13
-0
lines changed Expand file tree Collapse file tree 4 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ export function useTable<A extends NaiveUI.TableApiFn>(config: NaiveUI.NaiveTabl
2020
2121 const SELECTION_KEY = '__selection__' ;
2222
23+ const EXPAND_KEY = '__expand__' ;
24+
2325 const {
2426 loading,
2527 empty,
@@ -68,6 +70,12 @@ export function useTable<A extends NaiveUI.TableApiFn>(config: NaiveUI.NaiveTabl
6870 title : $t ( 'common.check' ) ,
6971 checked : true
7072 } ) ;
73+ } else if ( column . type === 'expand' ) {
74+ checks . push ( {
75+ key : EXPAND_KEY ,
76+ title : $t ( 'common.expandColumn' ) ,
77+ checked : true
78+ } ) ;
7179 }
7280 } ) ;
7381
@@ -81,6 +89,8 @@ export function useTable<A extends NaiveUI.TableApiFn>(config: NaiveUI.NaiveTabl
8189 columnMap . set ( column . key as string , column ) ;
8290 } else if ( column . type === 'selection' ) {
8391 columnMap . set ( SELECTION_KEY , column ) ;
92+ } else if ( column . type === 'expand' ) {
93+ columnMap . set ( EXPAND_KEY , column ) ;
8494 }
8595 } ) ;
8696
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ const local: App.I18n.Schema = {
1111 cancel : 'Cancel' ,
1212 close : 'Close' ,
1313 check : 'Check' ,
14+ expandColumn : 'Expand Column' ,
1415 columnSetting : 'Column Setting' ,
1516 config : 'Config' ,
1617 confirm : 'Confirm' ,
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ const local: App.I18n.Schema = {
1111 cancel : '取消' ,
1212 close : '关闭' ,
1313 check : '勾选' ,
14+ expandColumn : '展开列' ,
1415 columnSetting : '列设置' ,
1516 config : '配置' ,
1617 confirm : '确认' ,
Original file line number Diff line number Diff line change @@ -261,6 +261,7 @@ declare namespace App {
261261 cancel : string ;
262262 close : string ;
263263 check : string ;
264+ expandColumn : string ;
264265 columnSetting : string ;
265266 config : string ;
266267 confirm : string ;
You can’t perform that action at this time.
0 commit comments