UNPKG

@wufengteam/wform

Version:

@wufengteam/wform

25 lines 1.04 kB
var __rest = this && this.__rest || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; import React from 'react'; import { Button } from 'antd'; export default (function (props) { var tableData = props.tableData, title = props.title, other = __rest(props, ["tableData", "title"]); return /*#__PURE__*/React.createElement(Button, Object.assign({}, other, { onClick: function onClick() { // const filename = `${name}.xlsx`; // const wsName = 'SheetJS'; // const wb = utils.book_new(); // const ws = utils.aoa_to_sheet([tableData]); // utils.book_append_sheet(wb, ws, wsName); // writeFile(wb, filename); } }), title || '导出模版'); });