Commit efb27aff0a6bd195e097c04b102ef6d562a95b16
1 parent
fcee7d4e
style(table): remove unless style
Showing
5 changed files
with
96 additions
and
93 deletions
build/vite/plugin/imagemin.ts
src/components/Table/src/components/TableFooter.vue
... | ... | @@ -75,12 +75,15 @@ |
75 | 75 | Reflect.deleteProperty(columns[index], 'customRender'); |
76 | 76 | } |
77 | 77 | } |
78 | + | |
78 | 79 | if (table.getRowSelection() && hasRowSummary) { |
80 | + const isFixed = columns.some((col) => col.fixed === 'left'); | |
79 | 81 | columns.unshift({ |
80 | 82 | width: 60, |
81 | 83 | title: 'selection', |
82 | 84 | key: 'selectionKey', |
83 | 85 | align: 'center', |
86 | + ...(isFixed ? { fixed: 'left' } : {}), | |
84 | 87 | customRender: ({ record }) => record[SUMMARY_ROW_KEY], |
85 | 88 | }); |
86 | 89 | } | ... | ... |
src/components/Table/src/hooks/useTableScroll.ts
... | ... | @@ -75,7 +75,7 @@ export function useTableScroll( |
75 | 75 | // Table height from bottom height-custom offset |
76 | 76 | |
77 | 77 | const paddingHeight = 32; |
78 | - const borderHeight = 2 * 2; | |
78 | + const borderHeight = 0; | |
79 | 79 | // Pager height |
80 | 80 | let paginationHeight = 2; |
81 | 81 | if (!isBoolean(pagination)) { | ... | ... |
src/components/Table/src/style/index.less
... | ... | @@ -13,9 +13,9 @@ |
13 | 13 | border-radius: 4px; |
14 | 14 | } |
15 | 15 | |
16 | - .ant-table-wrapper { | |
17 | - border-radius: 2px; | |
18 | - } | |
16 | + // .ant-table-wrapper { | |
17 | + // border-radius: 2px; | |
18 | + // } | |
19 | 19 | } |
20 | 20 | |
21 | 21 | &-row__striped { |
... | ... | @@ -37,7 +37,7 @@ |
37 | 37 | .ant-table-wrapper { |
38 | 38 | padding: 8px; |
39 | 39 | background: #fff; |
40 | - border-radius: 4px; | |
40 | + border-radius: 2px; | |
41 | 41 | |
42 | 42 | .ant-table-title { |
43 | 43 | padding: 0 0 8px 0 !important; |
... | ... | @@ -50,9 +50,9 @@ |
50 | 50 | |
51 | 51 | // |
52 | 52 | .ant-table { |
53 | - width: 100%; | |
54 | - overflow-x: hidden; | |
55 | - border: none; | |
53 | + // width: 100%; | |
54 | + // overflow-x: hidden; | |
55 | + // border: none; | |
56 | 56 | |
57 | 57 | &-title { |
58 | 58 | display: flex; |
... | ... | @@ -62,50 +62,50 @@ |
62 | 62 | align-items: center; |
63 | 63 | } |
64 | 64 | |
65 | - .ant-table-thead > tr > th, | |
66 | - .ant-table-header { | |
67 | - background: #f1f3f4; | |
68 | - background-color: #f1f3f4 !important; | |
69 | - } | |
65 | + // .ant-table-thead > tr > th, | |
66 | + // .ant-table-header { | |
67 | + // background: #f1f3f4; | |
68 | + // background-color: #f1f3f4 !important; | |
69 | + // } | |
70 | 70 | |
71 | 71 | .ant-table-tbody > tr.ant-table-row-selected td { |
72 | 72 | background: fade(@primary-color, 8%) !important; |
73 | 73 | } |
74 | 74 | } |
75 | 75 | |
76 | - .ant-table-bordered .ant-table-header > table, | |
77 | - .ant-table-bordered .ant-table-body > table, | |
78 | - .ant-table-bordered .ant-table-fixed-left table, | |
79 | - .ant-table-bordered .ant-table-fixed-right table { | |
80 | - border: 1px solid @border-color !important; | |
81 | - } | |
76 | + // .ant-table-bordered .ant-table-header > table, | |
77 | + // .ant-table-bordered .ant-table-body > table, | |
78 | + // .ant-table-bordered .ant-table-fixed-left table, | |
79 | + // .ant-table-bordered .ant-table-fixed-right table { | |
80 | + // border: 1px solid @border-color !important; | |
81 | + // } | |
82 | 82 | |
83 | - .ant-table-thead { | |
84 | - tr { | |
85 | - border: none; | |
86 | - } | |
83 | + // .ant-table-thead { | |
84 | + // tr { | |
85 | + // border: none; | |
86 | + // } | |
87 | 87 | |
88 | - th { | |
89 | - border: none; | |
90 | - } | |
91 | - } | |
88 | + // th { | |
89 | + // border: none; | |
90 | + // } | |
91 | + // } | |
92 | 92 | |
93 | - .ant-table-bordered .ant-table-tbody > tr > td { | |
94 | - border-bottom: 1px solid @border-color !important; | |
93 | + // .ant-table-bordered .ant-table-tbody > tr > td { | |
94 | + // border-bottom: 1px solid @border-color !important; | |
95 | 95 | |
96 | - &:last-child { | |
97 | - border-right: none !important; | |
98 | - } | |
99 | - } | |
96 | + // &:last-child { | |
97 | + // border-right: none !important; | |
98 | + // } | |
99 | + // } | |
100 | 100 | |
101 | - .ant-table.ant-table-bordered .ant-table-footer, | |
102 | - .ant-table.ant-table-bordered .ant-table-title { | |
103 | - border: 1px solid @border-color !important; | |
104 | - } | |
101 | + // .ant-table.ant-table-bordered .ant-table-footer, | |
102 | + // .ant-table.ant-table-bordered .ant-table-title { | |
103 | + // border: 1px solid @border-color !important; | |
104 | + // } | |
105 | 105 | |
106 | - .ant-table-bordered.ant-table-empty .ant-table-placeholder { | |
107 | - border: 1px solid @border-color !important; | |
108 | - } | |
106 | + // .ant-table-bordered.ant-table-empty .ant-table-placeholder { | |
107 | + // border: 1px solid @border-color !important; | |
108 | + // } | |
109 | 109 | |
110 | 110 | .ant-table-tbody > tr > td, |
111 | 111 | .ant-table-tbody > tr > th, |
... | ... | @@ -114,61 +114,61 @@ |
114 | 114 | white-space: pre; |
115 | 115 | } |
116 | 116 | |
117 | - .ant-table-row-cell-last { | |
118 | - border-right: none !important; | |
119 | - } | |
117 | + // .ant-table-row-cell-last { | |
118 | + // border-right: none !important; | |
119 | + // } | |
120 | 120 | |
121 | - .ant-table-bordered .ant-table-thead > tr > th, | |
122 | - .ant-table-bordered .ant-table-tbody > tr > td { | |
123 | - border-right: 1px solid @border-color !important; | |
124 | - } | |
121 | + // .ant-table-bordered .ant-table-thead > tr > th, | |
122 | + // .ant-table-bordered .ant-table-tbody > tr > td { | |
123 | + // border-right: 1px solid @border-color !important; | |
124 | + // } | |
125 | 125 | |
126 | 126 | .ant-pagination { |
127 | 127 | margin: 10px 0 0 0; |
128 | 128 | } |
129 | 129 | |
130 | - .ant-table-body { | |
131 | - overflow-x: auto !important; | |
132 | - overflow-y: scroll !important; | |
133 | - } | |
134 | - | |
135 | - .ant-table-header { | |
136 | - margin-bottom: 0 !important; | |
137 | - overflow-x: hidden !important; | |
138 | - overflow-y: scroll !important; | |
139 | - } | |
140 | - | |
141 | - .ant-table-fixed-right { | |
142 | - right: -1px; | |
143 | - | |
144 | - .ant-table-header { | |
145 | - border-left: 1px solid @border-color !important; | |
146 | - | |
147 | - .ant-table-fixed { | |
148 | - border-bottom: none; | |
149 | - | |
150 | - .ant-table-thead th { | |
151 | - background: rgb(241, 243, 244); | |
152 | - } | |
153 | - } | |
154 | - } | |
155 | - } | |
156 | - | |
157 | - .ant-table-fixed-left { | |
158 | - .ant-table-header { | |
159 | - overflow-y: hidden !important; | |
160 | - } | |
161 | - | |
162 | - .ant-table-fixed { | |
163 | - border-bottom: none; | |
164 | - } | |
165 | - } | |
166 | - | |
167 | - .ant-table-bordered .ant-table-thead > tr:not(:last-child) > th, | |
168 | - .ant-table-tbody > tr > td { | |
169 | - word-break: break-word; | |
170 | - border-color: @border-color !important; | |
171 | - } | |
130 | + // .ant-table-body { | |
131 | + // overflow-x: auto !important; | |
132 | + // overflow-y: scroll !important; | |
133 | + // } | |
134 | + | |
135 | + // .ant-table-header { | |
136 | + // margin-bottom: 0 !important; | |
137 | + // overflow-x: hidden !important; | |
138 | + // overflow-y: scroll !important; | |
139 | + // } | |
140 | + | |
141 | + // .ant-table-fixed-right { | |
142 | + // right: -1px; | |
143 | + | |
144 | + // .ant-table-header { | |
145 | + // border-left: 1px solid @border-color !important; | |
146 | + | |
147 | + // .ant-table-fixed { | |
148 | + // border-bottom: none; | |
149 | + | |
150 | + // .ant-table-thead th { | |
151 | + // background: rgb(241, 243, 244); | |
152 | + // } | |
153 | + // } | |
154 | + // } | |
155 | + // } | |
156 | + | |
157 | + // .ant-table-fixed-left { | |
158 | + // .ant-table-header { | |
159 | + // overflow-y: hidden !important; | |
160 | + // } | |
161 | + | |
162 | + // .ant-table-fixed { | |
163 | + // border-bottom: none; | |
164 | + // } | |
165 | + // } | |
166 | + | |
167 | + // .ant-table-bordered .ant-table-thead > tr:not(:last-child) > th, | |
168 | + // .ant-table-tbody > tr > td { | |
169 | + // word-break: break-word; | |
170 | + // border-color: @border-color !important; | |
171 | + // } | |
172 | 172 | |
173 | 173 | .ant-table-footer { |
174 | 174 | padding: 0; | ... | ... |