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, }, },} |
特别申明:
本站所有资源都是由网友投稿发布,或转载各大下载站,请自行检测软件的完整性!
本站所有资源仅供学习与参考,请勿用于商业用途,否则产生的一切后果将由您自己承担!
如有侵权请联系我们删除下架,联系方式:lei1294551502@163.com