UNPKG

ng-layout-form

Version:

layout form

26 lines (25 loc) 696 B
import { jsx as _jsx } from "react/jsx-runtime"; export function getFormStyle(formConf) { return { justifyContent: formConf.justifyContent || 'flex-start', flexWrap: 'wrap', marginLeft: 0, marginRight: 0 }; } //获取label配置 export function Label(formConf, item, required) { var labeWidth = item.labelWidth || formConf.labelWidth || 120; var labelAlign = item.labelAlign || formConf.labelAlign || 'right'; var style = { display: 'inline-block', width: "".concat(labeWidth, "px"), textAlign: labelAlign, marginRight: '10px', color: required ? 'red' : '' }; return /*#__PURE__*/_jsx("span", { style: style, children: item.label }); }