IDuxFE / idux

🚀 A UI Component Library for Vue3.x
https://idux.site
MIT License
545 stars 141 forks source link

fix(comp:table): refactor table column width measure logic #1899

Closed sallerli1 closed 6 months ago

sallerli1 commented 6 months ago
  1. measured width should be used in table header fix holder
  2. column width is evenly aligned when scroll.width is provided
  3. table content colgroup width is set using width config in columns

PR Checklist

Please check if your PR fulfills the following requirements:

What is the current behavior?

表头的colgroup也优先使用了column中给定的width,导致表头会有错位

What is the new behavior?

重构宽度测量和计算逻辑,在表格体的colgroup中仅使用配置的宽度,而在固定的表头中和固定列的offset计算中使用测量得到的宽度

Other information

idux-bot[bot] commented 6 months ago

This preview will be available after the AzureCI is passed.

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 96.42857% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 90.75%. Comparing base (8debc9d) to head (a965ea8).

Files Patch % Lines
packages/components/table/src/Table.tsx 95.45% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1899 +/- ## ======================================= Coverage 90.74% 90.75% ======================================= Files 359 359 Lines 35264 35285 +21 Branches 2807 2806 -1 ======================================= + Hits 32002 32023 +21 Misses 3262 3262 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.