UNPKG

@wufengteam/wform

Version:

@wufengteam/wform

28 lines 917 B
/* eslint-disable no-console */ // @ts-ignore import React from 'react'; import ColumnsRender from '../../../components/ColumnsRender'; import { isPlainObject } from '../../../utils/tool'; var Text = function Text(props) { var value = props.value, dsl = props.dsl, attrCode = props.attrCode, appId = props.appId, getEngineApis = props.getEngineApis; var value2 = ''; if (!dsl) { value2 = value; if (isPlainObject(value) || Array.isArray(value)) { value2 = JSON.stringify(value); } } return /*#__PURE__*/React.createElement(React.Fragment, null, dsl ? ( /*#__PURE__*/React.createElement(React.Fragment, null, value ? ColumnsRender({ dataSource: value, attrCode: attrCode, appId: appId, dsl: dsl, platform: 'pc', getEngineApis: getEngineApis }) : '暂无数据')) : ( /*#__PURE__*/React.createElement("span", null, value2))); }; export default Text;