Skip to content

Commit f49411b

Browse files
fix: ensure Watermark covers Table fixed columns by default (ant-design#57813)
Co-authored-by: 遇见同学 <1875694521@qq.com>
1 parent 92c86f8 commit f49411b

8 files changed

Lines changed: 863 additions & 23 deletions

File tree

components/watermark/__tests__/__snapshots__/demo-extend.test.ts.snap

Lines changed: 397 additions & 4 deletions
Large diffs are not rendered by default.

components/watermark/__tests__/__snapshots__/demo.test.ts.snap

Lines changed: 388 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,394 @@ exports[`renders components/watermark/demo/custom.tsx correctly 1`] = `
746746
</div>
747747
`;
748748

749+
exports[`renders components/watermark/demo/debug.tsx correctly 1`] = `
750+
<div
751+
class=""
752+
style="position:relative;overflow:hidden"
753+
>
754+
<div
755+
class="css-var-test-id ant-table-css-var ant-table-wrapper"
756+
>
757+
<div
758+
aria-busy="false"
759+
aria-live="polite"
760+
class="ant-spin css-var-test-id"
761+
>
762+
<div
763+
class="ant-spin-container"
764+
>
765+
<div
766+
class="ant-table css-var-test-id ant-table-css-var ant-table-fix-start-shadow ant-table-fix-end-shadow ant-table-fixed-column ant-table-scroll-horizontal ant-table-has-fix-start ant-table-has-fix-end"
767+
>
768+
<div
769+
class="ant-table-container"
770+
>
771+
<div
772+
class="ant-table-content"
773+
style="overflow-x:auto;overflow-y:hidden"
774+
>
775+
<table
776+
style="width:max-content;min-width:100%;table-layout:auto"
777+
>
778+
<colgroup>
779+
<col
780+
style="width:120px"
781+
/>
782+
<col
783+
style="width:100px"
784+
/>
785+
<col
786+
style="width:120px"
787+
/>
788+
<col
789+
style="width:120px"
790+
/>
791+
<col
792+
style="width:120px"
793+
/>
794+
<col
795+
style="width:120px"
796+
/>
797+
<col
798+
style="width:120px"
799+
/>
800+
<col
801+
style="width:120px"
802+
/>
803+
<col
804+
style="width:120px"
805+
/>
806+
<col
807+
style="width:120px"
808+
/>
809+
<col
810+
style="width:100px"
811+
/>
812+
</colgroup>
813+
<thead
814+
class="ant-table-thead"
815+
>
816+
<tr>
817+
<th
818+
class="ant-table-cell ant-table-cell-fix ant-table-cell-fix-start"
819+
scope="col"
820+
style="inset-inline-start:0;--z-offset:22;--z-offset-reverse:11"
821+
>
822+
Full Name
823+
</th>
824+
<th
825+
class="ant-table-cell ant-table-cell-fix ant-table-cell-fix-start ant-table-cell-fix-start-shadow"
826+
scope="col"
827+
style="inset-inline-start:0;--z-offset:21;--z-offset-reverse:12"
828+
>
829+
Age
830+
</th>
831+
<th
832+
class="ant-table-cell"
833+
scope="col"
834+
>
835+
Column 1
836+
</th>
837+
<th
838+
class="ant-table-cell"
839+
scope="col"
840+
>
841+
Column 2
842+
</th>
843+
<th
844+
class="ant-table-cell"
845+
scope="col"
846+
>
847+
Column 3
848+
</th>
849+
<th
850+
class="ant-table-cell"
851+
scope="col"
852+
>
853+
Column 4
854+
</th>
855+
<th
856+
class="ant-table-cell"
857+
scope="col"
858+
>
859+
Column 5
860+
</th>
861+
<th
862+
class="ant-table-cell"
863+
scope="col"
864+
>
865+
Column 6
866+
</th>
867+
<th
868+
class="ant-table-cell"
869+
scope="col"
870+
>
871+
Column 7
872+
</th>
873+
<th
874+
class="ant-table-cell"
875+
scope="col"
876+
>
877+
Column 8
878+
</th>
879+
<th
880+
class="ant-table-cell ant-table-cell-fix ant-table-cell-fix-end ant-table-cell-fix-end-shadow"
881+
scope="col"
882+
style="inset-inline-end:0;--z-offset:10;--z-offset-reverse:1"
883+
>
884+
Action
885+
</th>
886+
</tr>
887+
</thead>
888+
<tbody
889+
class="ant-table-tbody"
890+
>
891+
<tr
892+
aria-hidden="true"
893+
class="ant-table-measure-row"
894+
style="height:0"
895+
>
896+
<td
897+
style="padding-top:0;padding-bottom:0;border-top:0;border-bottom:0;height:0"
898+
>
899+
<div
900+
style="height:0;overflow:hidden;font-weight:bold"
901+
>
902+
Full Name
903+
</div>
904+
</td>
905+
<td
906+
style="padding-top:0;padding-bottom:0;border-top:0;border-bottom:0;height:0"
907+
>
908+
<div
909+
style="height:0;overflow:hidden;font-weight:bold"
910+
>
911+
Age
912+
</div>
913+
</td>
914+
<td
915+
style="padding-top:0;padding-bottom:0;border-top:0;border-bottom:0;height:0"
916+
>
917+
<div
918+
style="height:0;overflow:hidden;font-weight:bold"
919+
>
920+
Column 1
921+
</div>
922+
</td>
923+
<td
924+
style="padding-top:0;padding-bottom:0;border-top:0;border-bottom:0;height:0"
925+
>
926+
<div
927+
style="height:0;overflow:hidden;font-weight:bold"
928+
>
929+
Column 2
930+
</div>
931+
</td>
932+
<td
933+
style="padding-top:0;padding-bottom:0;border-top:0;border-bottom:0;height:0"
934+
>
935+
<div
936+
style="height:0;overflow:hidden;font-weight:bold"
937+
>
938+
Column 3
939+
</div>
940+
</td>
941+
<td
942+
style="padding-top:0;padding-bottom:0;border-top:0;border-bottom:0;height:0"
943+
>
944+
<div
945+
style="height:0;overflow:hidden;font-weight:bold"
946+
>
947+
Column 4
948+
</div>
949+
</td>
950+
<td
951+
style="padding-top:0;padding-bottom:0;border-top:0;border-bottom:0;height:0"
952+
>
953+
<div
954+
style="height:0;overflow:hidden;font-weight:bold"
955+
>
956+
Column 5
957+
</div>
958+
</td>
959+
<td
960+
style="padding-top:0;padding-bottom:0;border-top:0;border-bottom:0;height:0"
961+
>
962+
<div
963+
style="height:0;overflow:hidden;font-weight:bold"
964+
>
965+
Column 6
966+
</div>
967+
</td>
968+
<td
969+
style="padding-top:0;padding-bottom:0;border-top:0;border-bottom:0;height:0"
970+
>
971+
<div
972+
style="height:0;overflow:hidden;font-weight:bold"
973+
>
974+
Column 7
975+
</div>
976+
</td>
977+
<td
978+
style="padding-top:0;padding-bottom:0;border-top:0;border-bottom:0;height:0"
979+
>
980+
<div
981+
style="height:0;overflow:hidden;font-weight:bold"
982+
>
983+
Column 8
984+
</div>
985+
</td>
986+
<td
987+
style="padding-top:0;padding-bottom:0;border-top:0;border-bottom:0;height:0"
988+
>
989+
<div
990+
style="height:0;overflow:hidden;font-weight:bold"
991+
>
992+
Action
993+
</div>
994+
</td>
995+
</tr>
996+
<tr
997+
class="ant-table-row ant-table-row-level-0"
998+
data-row-key="1"
999+
>
1000+
<td
1001+
class="ant-table-cell ant-table-cell-fix ant-table-cell-fix-start"
1002+
style="inset-inline-start:0;--z-offset:22;--z-offset-reverse:11"
1003+
>
1004+
Olivia
1005+
</td>
1006+
<td
1007+
class="ant-table-cell ant-table-cell-fix ant-table-cell-fix-start ant-table-cell-fix-start-shadow"
1008+
style="inset-inline-start:0;--z-offset:21;--z-offset-reverse:12"
1009+
>
1010+
32
1011+
</td>
1012+
<td
1013+
class="ant-table-cell"
1014+
>
1015+
New York Park
1016+
</td>
1017+
<td
1018+
class="ant-table-cell"
1019+
>
1020+
New York Park
1021+
</td>
1022+
<td
1023+
class="ant-table-cell"
1024+
>
1025+
New York Park
1026+
</td>
1027+
<td
1028+
class="ant-table-cell"
1029+
>
1030+
New York Park
1031+
</td>
1032+
<td
1033+
class="ant-table-cell"
1034+
>
1035+
New York Park
1036+
</td>
1037+
<td
1038+
class="ant-table-cell"
1039+
>
1040+
New York Park
1041+
</td>
1042+
<td
1043+
class="ant-table-cell"
1044+
>
1045+
New York Park
1046+
</td>
1047+
<td
1048+
class="ant-table-cell"
1049+
>
1050+
New York Park
1051+
</td>
1052+
<td
1053+
class="ant-table-cell ant-table-cell-fix ant-table-cell-fix-end ant-table-cell-fix-end-shadow"
1054+
style="inset-inline-end:0;--z-offset:10;--z-offset-reverse:1"
1055+
>
1056+
<a>
1057+
action
1058+
</a>
1059+
</td>
1060+
</tr>
1061+
<tr
1062+
class="ant-table-row ant-table-row-level-0"
1063+
data-row-key="2"
1064+
>
1065+
<td
1066+
class="ant-table-cell ant-table-cell-fix ant-table-cell-fix-start"
1067+
style="inset-inline-start:0;--z-offset:22;--z-offset-reverse:11"
1068+
>
1069+
Ethan
1070+
</td>
1071+
<td
1072+
class="ant-table-cell ant-table-cell-fix ant-table-cell-fix-start ant-table-cell-fix-start-shadow"
1073+
style="inset-inline-start:0;--z-offset:21;--z-offset-reverse:12"
1074+
>
1075+
40
1076+
</td>
1077+
<td
1078+
class="ant-table-cell"
1079+
>
1080+
London Park
1081+
</td>
1082+
<td
1083+
class="ant-table-cell"
1084+
>
1085+
London Park
1086+
</td>
1087+
<td
1088+
class="ant-table-cell"
1089+
>
1090+
London Park
1091+
</td>
1092+
<td
1093+
class="ant-table-cell"
1094+
>
1095+
London Park
1096+
</td>
1097+
<td
1098+
class="ant-table-cell"
1099+
>
1100+
London Park
1101+
</td>
1102+
<td
1103+
class="ant-table-cell"
1104+
>
1105+
London Park
1106+
</td>
1107+
<td
1108+
class="ant-table-cell"
1109+
>
1110+
London Park
1111+
</td>
1112+
<td
1113+
class="ant-table-cell"
1114+
>
1115+
London Park
1116+
</td>
1117+
<td
1118+
class="ant-table-cell ant-table-cell-fix ant-table-cell-fix-end ant-table-cell-fix-end-shadow"
1119+
style="inset-inline-end:0;--z-offset:10;--z-offset-reverse:1"
1120+
>
1121+
<a>
1122+
action
1123+
</a>
1124+
</td>
1125+
</tr>
1126+
</tbody>
1127+
</table>
1128+
</div>
1129+
</div>
1130+
</div>
1131+
</div>
1132+
</div>
1133+
</div>
1134+
</div>
1135+
`;
1136+
7491137
exports[`renders components/watermark/demo/image.tsx correctly 1`] = `
7501138
<div
7511139
class=""

0 commit comments

Comments
 (0)