在我的表中,我将列中第一个单元格的宽度设置为100px.
但是,当此列中某个单元格中的文本太长时,列的宽度会变得更大100px.我怎么能禁用这个扩展?
我正在开发一个用于产品数据管理的webapp,其中产品数据显示在一个包含4列(索引号,SKU,产品描述和库存)的表中.
我面临的问题是,当表变得非常大(> 1000行)时,页面非常滞后,特别是当我将鼠标悬停在一行上时(我__CODE__在CSS中定义).
我尝试通过使用一些javascript来部分地显示数据并在用户向下滚动时加载更多来解决此问题:
/**
* @namespace Start the project called 'stck'
*/
var stck = {};
/**
* Variable to save stock loaded
*/
stck.stockInfo = [];
/**
* Load the item informaction acording the SKU
* @private
* @param {string} SKU The SKU of the item
*/
stck.loadItemInformation = function(SKU) {
var descriptionsTable = document.getElementById('descriptionsTable');
for (var rowsLength = descriptionsTable.rows.length - 1; --rowsLength; ) {
descriptionsTable.deleteRow(1);
}
var pricesTable = document.getElementById('pricesTable');
for (var rowsLength = pricesTable.rows.length …Run Code Online (Sandbox Code Playgroud)