基于Web的JavaScript电子表格插件
插件特效

插件描述:x-spreadsheet是一个基于Web的JavaScript(canvas)电子表格。
快速使用
html
1 | <div id="x-spreadsheet-demo"></div> |
js
1 2 3 4 5 6 7 8 9 | import Spreadsheet from "x-data-spreadsheet";// 如果需要覆盖默认选项,可以设置覆盖// const options = {};// new Spreadsheet('#x-spreadsheet-demo', options);new Spreadsheet("#x-spreadsheet-demo") .loadData({}) // load data .change(data => { // 将数据保存到db }); |
默认选项
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | { showToolbar: true, showGrid: true, view: { height: () => document.documentElement.clientHeight, width: () => document.documentElement.clientWidth, }, row: { len: 100, height: 25, }, col: { len: 26, width: 100, indexWidth: 60, minWidth: 60, }, style: { bgcolor: '#ffffff', align: 'left', valign: 'middle', textwrap: false, strike: false, underline: false, color: '#0a0a0a', font: { name: 'Helvetica', size: 10, bold: false, italic: false, }, },} |
评论