File tree Expand file tree Collapse file tree 5 files changed +12
-10
lines changed Expand file tree Collapse file tree 5 files changed +12
-10
lines changed Original file line number Diff line number Diff line change 4444<DemoBlock Title =" @Localizer[" AllowResizingTitle " ]"
4545 Introduction =" @Localizer[" AllowResizingIntro " ]"
4646 Name =" AllowResizing" >
47- <p class =" mb-3" >@( (MarkupString )Localizer [" AllowResizingDesc" ].Value ) </p >
47+ <section ignore class =" mb-3" >@( (MarkupString )Localizer [" AllowResizingDesc" ].Value ) </section >
4848 <Table TItem =" Foo"
49- IsPagination =" true" PageItemsSource =" @PageItemsSource" AllowResizing =" true"
49+ IsPagination =" true" PageItemsSource =" @PageItemsSource"
50+ AllowResizing =" true" ClientTableName =" table-test"
5051 IsStriped =" true" IsBordered =" true" RenderMode =" TableRenderMode.Table"
5152 ShowToolbar =" false" IsMultipleSelect =" true"
5253 OnQueryAsync =" @OnQueryAsync" >
Original file line number Diff line number Diff line change 48224822 "WidthP3" : " 通过设置按钮 <code>IsShow</code> 参数来控制是否显示按钮" ,
48234823 "AllowResizingTitle" : " 允许列调整" ,
48244824 "AllowResizingIntro" : " 通过指定 <code>AllowResizing</code> 设置表格列允许调整宽度" ,
4825- "AllowResizingDesc" : " <b>注意:</b> <code>Table</code> 父容器有有效宽度值时 <code>Table</code> 才会出现滚动条" ,
4825+ "AllowResizingDesc" : " <b>注意:</b> <code>Table</code> 父容器有有效宽度值时 <code>Table</code> 才会出现滚动条,可通过设置 <code>ClientTableName</code> 参数开启本地化存储列宽功能,即通过拖拽后列宽下次打开时会保持 " ,
48264826 "WidthButtonText1" : " 明细" ,
48274827 "WidthButtonText2" : " 编辑" ,
48284828 "WidthButtonText3" : " 权限" ,
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk.Razor" >
22
33 <PropertyGroup >
4- <Version >8.0.3-beta02 </Version >
4+ <Version >8.0.3-beta03 </Version >
55 </PropertyGroup >
66
77 <ItemGroup Condition =" '$(TargetFramework)' == 'net5.0'" >
Original file line number Diff line number Diff line change @@ -579,7 +579,7 @@ public void ExpandDetailRow(TItem item)
579579 /// 获得/设置 表格名称 默认 null 用于列宽持久化功能
580580 /// </summary>
581581 [ Parameter ]
582- public string ? TableName { get ; set ; }
582+ public string ? ClientTableName { get ; set ; }
583583
584584 [ CascadingParameter ]
585585 [ NotNull ]
@@ -836,14 +836,14 @@ protected override async Task OnAfterRenderAsync(bool firstRender)
836836 ? $ "width: { _localStorageTableWidth . Value } px;"
837837 : null ;
838838
839- private string ? GetTableName ( bool hasHeader ) => hasHeader ? TableName : null ;
839+ private string ? GetTableName ( bool hasHeader ) => hasHeader ? ClientTableName : null ;
840840
841841 private async Task < IEnumerable < ColumnWidth > > ReloadColumnWidth ( )
842842 {
843843 IEnumerable < ColumnWidth > ? ret = null ;
844- if ( ! string . IsNullOrEmpty ( TableName ) && AllowResizing )
844+ if ( ! string . IsNullOrEmpty ( ClientTableName ) && AllowResizing )
845845 {
846- var jsonData = await InvokeAsync < string > ( "reloadColumnWidth" , Id , TableName ) ;
846+ var jsonData = await InvokeAsync < string > ( "reloadColumnWidth" , Id , ClientTableName ) ;
847847 if ( ! string . IsNullOrEmpty ( jsonData ) )
848848 {
849849 try
Original file line number Diff line number Diff line change @@ -579,10 +579,11 @@ export function sort(id) {
579579export function load ( id , method ) {
580580 const table = Data . get ( id )
581581
582- const loader = table . el . querySelector ( '. table-loader')
582+ const loader = [ ... table . el . children ] . find ( el => el . classList . contains ( ' table-loader') ) ;
583583 if ( method === 'show' ) {
584584 loader . classList . add ( 'show' )
585- } else {
585+ }
586+ else {
586587 loader . classList . remove ( 'show' )
587588 }
588589}
You can’t perform that action at this time.
0 commit comments