仿电子表格JavaScript库,可用于添加/删除/编辑/显示数据表就像电子表格中的数据。
添加一个表格
const example = Spreadsheet('#example'); example.createSpreadsheet( { bank: 'text', 'cash ($)': 'number', 'credit debt ($)': 'number', 'investment portfolio ($)': 'number', city: 'text', 'dated opened': 'date', }, { // configs here } );添加数据
{ data: [ ['TD', '10000', '1000000', '34535', 'Toronto', '2021-04-06'], ['RBC', '50000', '325345', '76868', 'Markham', '2020-06-22'], ['AmEx', '10000000', '5644', '76054', 'New York City', '2020-07-06'], ], }指定行数
rowCount: 4本地存储
persistent: true提交回调方法
submitCallback: (tableArray) => alert(`Your table is currently ${tableArray.length} rows long!`), }添加颜色
example.addCellStyle(cellValue, color); // 或者 example.addCellStyleSheet({ cellValue1: color1, cellValue2: color2, // ... })
可编辑器的table表格js插件
正在加载文件目录...
- 热度 42
雉机化下载了 此素材
★天/ty啸☆下载了 此素材
E灯下载了 此素材
戰赱殤あ磊下载了 此素材
odinerd下载了 此素材
一日难再晨珍惜下载了 此素材
mxp下载了 此素材
Eliot S下载了 此素材
我的灵魂是一片夜海收藏了 此素材
cthily下载了 此素材