UNPKG

linkmore-design

Version:

🌈 🚀lm组件库。🚀

47 lines (45 loc) 1.99 kB
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; var _excluded = ["cellKey", "type", "height", "virtual", "ellipsis", "components", "dataSource", "cellConfig", "checkboxConfig"]; // 定义各种接口、类型抛出等 import React, { useRef, forwardRef } from 'react'; import LmCardTableRoot from "./table/TableRoot"; // export type LmCardTableProps<TData extends Record<string, any> = {}> { // rows: LM_Row<TData>[]; // } // 默认抛出 var LmCardTable = function LmCardTable(_ref, ref) { var _ref$cellKey = _ref.cellKey, cellKey = _ref$cellKey === void 0 ? 'id' : _ref$cellKey, _ref$type = _ref.type, type = _ref$type === void 0 ? 'PTC' : _ref$type, _ref$height = _ref.height, height = _ref$height === void 0 ? '100%' : _ref$height, _ref$virtual = _ref.virtual, virtual = _ref$virtual === void 0 ? true : _ref$virtual, _ref$ellipsis = _ref.ellipsis, ellipsis = _ref$ellipsis === void 0 ? true : _ref$ellipsis, _ref$components = _ref.components, components = _ref$components === void 0 ? {} : _ref$components, _ref$dataSource = _ref.dataSource, dataSource = _ref$dataSource === void 0 ? [] : _ref$dataSource, _ref$cellConfig = _ref.cellConfig, cellConfig = _ref$cellConfig === void 0 ? {} : _ref$cellConfig, _ref$checkboxConfig = _ref.checkboxConfig, checkboxConfig = _ref$checkboxConfig === void 0 ? {} : _ref$checkboxConfig, resetProps = _objectWithoutProperties(_ref, _excluded); var defaultRef = useRef(null); return /*#__PURE__*/React.createElement(LmCardTableRoot, _extends({ cellKey: cellKey, type: type, height: height, virtual: virtual, ellipsis: ellipsis, components: components, dataSource: dataSource, cellConfig: cellConfig, checkboxConfig: checkboxConfig, ref: ref || defaultRef }, resetProps)); }; export default /*#__PURE__*/forwardRef(LmCardTable);