mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:58:07 +08:00
fix some warning
This commit is contained in:
parent
c953d6a3e3
commit
6b9a368e44
@ -219,7 +219,7 @@ export function renderChild(
|
||||
<StatusScopedSchemaRenderer
|
||||
render={renderChild as any}
|
||||
{...props}
|
||||
key={schema.key}
|
||||
key={props.key}
|
||||
schema={schema}
|
||||
propKey={schema.key}
|
||||
$path={`${prefix ? `${prefix}/` : ''}${(schema && schema.type) || ''}`}
|
||||
@ -231,7 +231,7 @@ export function renderChild(
|
||||
<SchemaRenderer
|
||||
render={renderChild as any}
|
||||
{...props}
|
||||
key={schema.key}
|
||||
key={props.key}
|
||||
schema={schema}
|
||||
propKey={schema.key}
|
||||
$path={`${prefix ? `${prefix}/` : ''}${(schema && schema.type) || ''}`}
|
||||
|
@ -428,10 +428,10 @@ export class SchemaRenderer extends React.Component<SchemaRendererProps, any> {
|
||||
const {
|
||||
data: defaultData,
|
||||
value: defaultValue,
|
||||
key: propKey,
|
||||
activeKey: defaultActiveKey,
|
||||
...restSchema
|
||||
} = schema;
|
||||
const propKey = schema.key ?? this.props.key;
|
||||
const Component = renderer.component;
|
||||
|
||||
// 原来表单项的 visible: false 和 hidden: true 表单项的值和验证是有效的
|
||||
|
@ -549,18 +549,14 @@ export default class Drawer extends React.Component<DrawerProps> {
|
||||
</div>
|
||||
) : null}
|
||||
{actions.map((action, key) =>
|
||||
render(
|
||||
`action/${key}`,
|
||||
{key, ...action},
|
||||
{
|
||||
onAction: this.handleAction,
|
||||
onActionSensor: undefined,
|
||||
btnDisabled: store.loading,
|
||||
data: store.formData,
|
||||
key,
|
||||
disabled: action.disabled || store.loading
|
||||
}
|
||||
)
|
||||
render(`action/${key}`, action, {
|
||||
onAction: this.handleAction,
|
||||
onActionSensor: undefined,
|
||||
btnDisabled: store.loading,
|
||||
data: store.formData,
|
||||
key,
|
||||
disabled: action.disabled || store.loading
|
||||
})
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user