科技美学

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

 

 

1. Change source code

<div class="wp-list-table-container" style="overflow-x:auto;">
<table class="wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>">
	<thead>
	<tr>
		<?php $this->print_column_headers(); ?>
	</tr>
	</thead>

	<tbody id="the-list"
		<?php
		if ( $singular ) {
			echo " data-wp-lists='list:$singular'";
		}
		?>
		>
		<?php $this->display_rows_or_placeholder(); ?>
	</tbody>

	<tfoot>
	<tr>
		<?php $this->print_column_headers( false ); ?>
	</tr>
	</tfoot>

</table>
</div>

  wp-admin\includes\class-wp-list-table.php  line 1276~1299

在渲染HTML表格外,加上父div wp-list-table-container,style=overflow-x:auto。

 

2. set td fixed with

.post-type-algo-trade-record .wp-list-table th {width: 200px;}

  set table css
这样就能实现表格左右滚动。

posted on 2022-08-03 11:08  chankuang  阅读(58)  评论(0编辑  收藏  举报