mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-01 19:47:56 +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 {
|
||||
title?: string;
|
||||
showTitle?: boolean;
|
||||
showFooter?: boolean;
|
||||
headerClassName?: string;
|
||||
children: (props: {
|
||||
onClick: (e: React.MouseEvent) => void;
|
||||
@ -131,7 +132,8 @@ export class PickerContainer extends React.Component<
|
||||
showTitle,
|
||||
headerClassName,
|
||||
translate: __,
|
||||
size
|
||||
size,
|
||||
showFooter
|
||||
} = this.props;
|
||||
return (
|
||||
<>
|
||||
@ -158,15 +160,18 @@ export class PickerContainer extends React.Component<
|
||||
ref: this.bodyRef,
|
||||
setState: this.updateState,
|
||||
onClose: this.close,
|
||||
onChange: this.handleChange
|
||||
onChange: this.handleChange,
|
||||
onConfirm: this.confirm
|
||||
})}
|
||||
</Modal.Body>
|
||||
<Modal.Footer>
|
||||
<Button onClick={this.close}>{__('cancel')}</Button>
|
||||
<Button onClick={this.confirm} level="primary">
|
||||
{__('confirm')}
|
||||
</Button>
|
||||
</Modal.Footer>
|
||||
{showFooter ?? true ? (
|
||||
<Modal.Footer>
|
||||
<Button onClick={this.close}>{__('cancel')}</Button>
|
||||
<Button onClick={this.confirm} level="primary">
|
||||
{__('confirm')}
|
||||
</Button>
|
||||
</Modal.Footer>
|
||||
) : null}
|
||||
</Modal>
|
||||
</>
|
||||
);
|
||||
|
@ -61,7 +61,9 @@ import PullRefresh from './PullRefresh';
|
||||
import Table from './table';
|
||||
import SchemaVariableListPicker from './schema-editor/SchemaVariableListPicker';
|
||||
import SchemaVariableList from './schema-editor/SchemaVariableList';
|
||||
import VariableList from './formula/VariableList';
|
||||
import FormulaPicker from './formula/Picker';
|
||||
import PickerContainer from './PickerContainer';
|
||||
import InputJSONSchema from './json-schema';
|
||||
|
||||
export {
|
||||
@ -128,6 +130,8 @@ export {
|
||||
Table,
|
||||
SchemaVariableListPicker,
|
||||
SchemaVariableList,
|
||||
VariableList,
|
||||
PickerContainer,
|
||||
FormulaPicker,
|
||||
InputJSONSchema
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user