mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
fix: cards外观修复 (#8628)
Co-authored-by: hongyang03 <hongyang03@baidu.com>
This commit is contained in:
parent
c9ecb64b63
commit
a3089b65eb
@ -11,7 +11,9 @@ import {
|
||||
difference,
|
||||
ucFirst,
|
||||
autobind,
|
||||
createObject
|
||||
createObject,
|
||||
CustomStyle,
|
||||
setThemeClassName
|
||||
} from 'amis-core';
|
||||
import {
|
||||
isPureVariable,
|
||||
@ -923,7 +925,10 @@ export default class Cards extends React.Component<GridProps, object> {
|
||||
translate: __,
|
||||
loading = false,
|
||||
loadingConfig,
|
||||
env
|
||||
env,
|
||||
id,
|
||||
wrapperCustomStyle,
|
||||
themeCss
|
||||
} = this.props;
|
||||
|
||||
this.renderedToolbars = []; // 用来记录哪些 toolbar 已经渲染了,已经渲染了就不重复渲染了。
|
||||
@ -973,9 +978,15 @@ export default class Cards extends React.Component<GridProps, object> {
|
||||
return (
|
||||
<div
|
||||
ref={this.bodyRef}
|
||||
className={cx('Cards', className, {
|
||||
'Cards--unsaved': !!store.modified || !!store.moved
|
||||
})}
|
||||
className={cx(
|
||||
'Cards',
|
||||
className,
|
||||
{
|
||||
'Cards--unsaved': !!store.modified || !!store.moved
|
||||
},
|
||||
setThemeClassName('baseControlClassName', id, themeCss),
|
||||
setThemeClassName('wrapperCustomStyle', id, wrapperCustomStyle)
|
||||
)}
|
||||
style={buildStyle(style, data)}
|
||||
>
|
||||
{affixHeader ? (
|
||||
@ -1007,6 +1018,20 @@ export default class Cards extends React.Component<GridProps, object> {
|
||||
|
||||
{footer}
|
||||
<Spinner loadingConfig={loadingConfig} overlay show={loading} />
|
||||
|
||||
<CustomStyle
|
||||
config={{
|
||||
wrapperCustomStyle,
|
||||
id,
|
||||
themeCss,
|
||||
classNames: [
|
||||
{
|
||||
key: 'baseControlClassName'
|
||||
}
|
||||
]
|
||||
}}
|
||||
env={env}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user