File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -265,12 +265,32 @@ class CTable extends Component {
265265 this . updateSelectedNodes ( ) ;
266266
267267 this . column . setColumnData ( ) ;
268-
268+ this . upgradePingedRight ( ) ;
269269 this . setHeaderStyle ( ) ;
270270 this . setFixedStyle ( ) ;
271271 this . setFooterHeight ( ) ;
272272 } ;
273273
274+ // fix: 解决列固定阴影,偶发性不展示,滚动列才展示
275+ upgradePingedRight = ( ) => {
276+ setTimeout ( ( ) => {
277+ if ( this . ref . current ) {
278+ const bodyEle = this . ref . current . querySelector (
279+ `.${ tablePrefixCls } -body` ,
280+ ) ;
281+ if ( bodyEle ) {
282+ const { scrollWidth, clientWidth, scrollLeft } = bodyEle ;
283+ const rootDom = this . ref . current . querySelector ( `.${ tablePrefixCls } ` ) ;
284+ if ( scrollLeft < scrollWidth - clientWidth ) {
285+ rootDom . classList . add ( `${ tablePrefixCls } -ping-right` ) ;
286+ } else {
287+ rootDom . classList . remove ( `${ tablePrefixCls } -ping-right` ) ;
288+ }
289+ }
290+ }
291+ } ) ;
292+ } ;
293+
274294 /**
275295 * 解决表头滚动问题(rcTable bug)
276296 */
You can’t perform that action at this time.
0 commit comments