npm install @thtf/excel-designer
<div id="test"></div>
import Spreadsheet from '@thtf/excel-designer';
import '@thtf/excel-designer/dist/styles/spreadsheet.css';
const s = new Spreadsheet('#test')
.loadData({})
.change((data) => {
// save data to db
});
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@thtf/excel-designer@1.0.2/dist/styles/spreadsheet.css">
<script src="https://cdn.jsdelivr.net/npm/@thtf/excel-designer/dist/js/spreadsheet.min.js"></script>
<div id="test"></div>
<script>new Spreadsheet('#test');</script>
- 编译代码
npm run build
- 登录(登录过可忽略)
npm login
- 发布
npm publish