修复 tpl 问题

This commit is contained in:
2betop 2021-03-17 12:13:35 +08:00
parent 955ad22b5d
commit 44f72a7990

View File

@ -92,18 +92,16 @@ export default class StaticControl extends React.Component<StaticProps, any> {
data, data,
classnames: cx, classnames: cx,
name, name,
tpl,
...rest ...rest
} = this.props; } = this.props;
const subType = /^static/.test(type) const subType = /^static/.test(type)
? type.substring(7) || (tpl ? 'tpl' : 'plain') ? type.substring(7) || (rest.tpl ? 'tpl' : 'plain')
: type; : type;
const field = { const field = {
label, label,
name, name,
tpl,
...rest, ...rest,
type: subType type: subType
}; };