2021年4月12日 星期一

b-table sticky column 針對多個欄位凍結的設定方式

第二個以後的欄位需要設定left 避免往右捲動時覆蓋前面的欄位

<style>
        ._2ndtd {
            left:50px !important;
        }
        ._3ndtd {
            left:140px !important;
        }
</style> 

fields: [
                        {
                            key: 'a',
                            stickyColumn: true,
                            thStyle: { width: '50px' },
                        },
                        {
                            key: 'b',
                            stickyColumn: true,
                            thStyle: { width: '90px' },
                            thClass: '_2ndtd',
                            tdClass: '_2ndtd',
                        },
                        {
                            key: 'c',
                            stickyColumn: true,
                            thStyle: { width: '90px'},
                            thClass: '_3ndtd',
                            tdClass: '_3ndtd',
                        },

※ 使用 stickyColumn: true 就不能使用 sortable: true,否則會造成異常現象

沒有留言:

自訂權限驗證機制

// 使用 filter [Route("api/[controller]")] [ApiController] [Authorize] [TypeFilter(typeof(CustomAsyncAuthorizationFilter))] public c...