修复 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,
classnames: cx,
name,
tpl,
...rest
} = this.props;
const subType = /^static/.test(type)
? type.substring(7) || (tpl ? 'tpl' : 'plain')
? type.substring(7) || (rest.tpl ? 'tpl' : 'plain')
: type;
const field = {
label,
name,
tpl,
...rest,
type: subType
};