mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-04 21:19:01 +08:00
修复 tpl 问题
This commit is contained in:
parent
955ad22b5d
commit
44f72a7990
@ -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
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user