mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:58:07 +08:00
feat:PickerContainer支持隐藏footer&export VariableList and PickerContainer (#4466)
This commit is contained in:
parent
023c61e524
commit
d2b097c86a
@ -11,6 +11,7 @@ import Button from './Button';
|
|||||||
export interface PickerContainerProps extends ThemeProps, LocaleProps {
|
export interface PickerContainerProps extends ThemeProps, LocaleProps {
|
||||||
title?: string;
|
title?: string;
|
||||||
showTitle?: boolean;
|
showTitle?: boolean;
|
||||||
|
showFooter?: boolean;
|
||||||
headerClassName?: string;
|
headerClassName?: string;
|
||||||
children: (props: {
|
children: (props: {
|
||||||
onClick: (e: React.MouseEvent) => void;
|
onClick: (e: React.MouseEvent) => void;
|
||||||
@ -131,7 +132,8 @@ export class PickerContainer extends React.Component<
|
|||||||
showTitle,
|
showTitle,
|
||||||
headerClassName,
|
headerClassName,
|
||||||
translate: __,
|
translate: __,
|
||||||
size
|
size,
|
||||||
|
showFooter
|
||||||
} = this.props;
|
} = this.props;
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@ -158,15 +160,18 @@ export class PickerContainer extends React.Component<
|
|||||||
ref: this.bodyRef,
|
ref: this.bodyRef,
|
||||||
setState: this.updateState,
|
setState: this.updateState,
|
||||||
onClose: this.close,
|
onClose: this.close,
|
||||||
onChange: this.handleChange
|
onChange: this.handleChange,
|
||||||
|
onConfirm: this.confirm
|
||||||
})}
|
})}
|
||||||
</Modal.Body>
|
</Modal.Body>
|
||||||
<Modal.Footer>
|
{showFooter ?? true ? (
|
||||||
<Button onClick={this.close}>{__('cancel')}</Button>
|
<Modal.Footer>
|
||||||
<Button onClick={this.confirm} level="primary">
|
<Button onClick={this.close}>{__('cancel')}</Button>
|
||||||
{__('confirm')}
|
<Button onClick={this.confirm} level="primary">
|
||||||
</Button>
|
{__('confirm')}
|
||||||
</Modal.Footer>
|
</Button>
|
||||||
|
</Modal.Footer>
|
||||||
|
) : null}
|
||||||
</Modal>
|
</Modal>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
@ -61,7 +61,9 @@ import PullRefresh from './PullRefresh';
|
|||||||
import Table from './table';
|
import Table from './table';
|
||||||
import SchemaVariableListPicker from './schema-editor/SchemaVariableListPicker';
|
import SchemaVariableListPicker from './schema-editor/SchemaVariableListPicker';
|
||||||
import SchemaVariableList from './schema-editor/SchemaVariableList';
|
import SchemaVariableList from './schema-editor/SchemaVariableList';
|
||||||
|
import VariableList from './formula/VariableList';
|
||||||
import FormulaPicker from './formula/Picker';
|
import FormulaPicker from './formula/Picker';
|
||||||
|
import PickerContainer from './PickerContainer';
|
||||||
import InputJSONSchema from './json-schema';
|
import InputJSONSchema from './json-schema';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
@ -128,6 +130,8 @@ export {
|
|||||||
Table,
|
Table,
|
||||||
SchemaVariableListPicker,
|
SchemaVariableListPicker,
|
||||||
SchemaVariableList,
|
SchemaVariableList,
|
||||||
|
VariableList,
|
||||||
|
PickerContainer,
|
||||||
FormulaPicker,
|
FormulaPicker,
|
||||||
InputJSONSchema
|
InputJSONSchema
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user