UNPKG

@uiw-admin/components

Version:
40 lines 994 B
import _extends from "@babel/runtime/helpers/extends"; import { Descriptions } from 'uiw'; import { getReadValue } from './utils/index'; import { jsx as _jsx } from "react/jsx-runtime"; export default (_ref => { var { title, formDatas, readOnlyProps, className, layout, style } = _ref; return /*#__PURE__*/_jsx(Descriptions, _extends({ bordered: true, title: title, layout: layout }, readOnlyProps, { className: className, style: _extends({ width: '100%' }, style), children: formDatas == null ? void 0 : formDatas.map((_ref2, index) => { var { hide, label, widget, initialValue = '', option = [], readSpan = 1, widgetProps = {} } = _ref2; return hide ? null : /*#__PURE__*/_jsx(Descriptions.Item, { span: readSpan, label: label, children: getReadValue(widget, initialValue, option, widgetProps) }, index); }) })); });