mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 02:58:05 +08:00
feat: LocationPicker 支持全局设置 ak (#8732)
This commit is contained in:
parent
a5326fef03
commit
1ec20cbbeb
@ -87,6 +87,16 @@ export interface RendererEnv {
|
||||
affixOffsetBottom?: number;
|
||||
|
||||
richTextToken: string;
|
||||
|
||||
/**
|
||||
* 默认的选址组件提供商,目前支持仅 baidu
|
||||
*/
|
||||
locationPickerVendor?: string;
|
||||
|
||||
/**
|
||||
* 选址组件的 ak
|
||||
*/
|
||||
locationPickerAK?: string;
|
||||
loadRenderer: (
|
||||
schema: Schema,
|
||||
path: string,
|
||||
|
@ -132,6 +132,13 @@
|
||||
max-width: 100%;
|
||||
margin-top: -1px;
|
||||
border-color: var(--Form-input-onFocused-borderColor);
|
||||
|
||||
&.#{$ns}PopOver--v-top {
|
||||
margin-top: px2rem(4px);
|
||||
}
|
||||
&.#{$ns}PopOver--v-bottom {
|
||||
margin-bottom: px2rem(4px);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}MapPicker {
|
||||
|
@ -142,17 +142,15 @@ export class LocationControl extends React.Component<LocationControlProps> {
|
||||
|
||||
@supportStatic()
|
||||
render() {
|
||||
const {style} = this.props;
|
||||
const {style, env} = this.props;
|
||||
const ak = filter(this.props.ak, this.props.data) || env.locationPickerAK!;
|
||||
return (
|
||||
<div
|
||||
className={this.props.classnames('LocationControl', {
|
||||
'is-mobile': isMobile()
|
||||
})}
|
||||
>
|
||||
<LocationPicker
|
||||
{...this.props}
|
||||
ak={filter(this.props.ak, this.props.data)}
|
||||
/>
|
||||
<LocationPicker {...this.props} ak={ak} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user