提交 d63b9291 authored 作者: 钟是志's avatar 钟是志

定位组件修改.

上级 118fa6c0
......@@ -31,6 +31,7 @@ export default class LocationCom extends React.Component {
}
}
changePos = (obj) => {
console.log(obj);
if (!('value' in this.props)) {
this.setState({ ...obj });
}
......
......@@ -28,10 +28,10 @@ export default class location extends Component {
//在组件从 DOM 中移除的时候立刻被调用。
componentWillUnmount = () => {};
getLocationMsg = locationMsg => {
console.log(locationMsg);
//如果不为空的话显示提示
this.setState({ loading: true }, () => {
if (Object.keys(locationMsg).length !== 0) {
this.props.onChange(locationMsg);
this.setState({
locationMsg: locationMsg,
loading: false,
......@@ -101,9 +101,9 @@ export default class location extends Component {
showMap={this.props.showMap}
params={params}
/>
<div style={{ display: showLocation ? 'block' : 'none' }}>
{' '}
<Popconfirm
<div style={{ display: 'block'}}>
{locationMsg?.address || ''}
{/* <Popconfirm
title={btn ? '正在定位中' : locationMsg.address}
onConfirm={this.confirm}
okText="提交"
......@@ -118,7 +118,7 @@ export default class location extends Component {
>
{this.props.btnName}
</Button>
</Popconfirm>
</Popconfirm>*/}
</div>
</div>
);
......
......@@ -2511,8 +2511,8 @@ export default class tableCom extends Component {
<span>
<LocationCom
get={get}
btnName={json.btnName}
btnSucName={json.btnSucName}
btnName={json.btnName || '定位'}
btnSucName={json.btnSucName || '定位成功'}
width={json.width}
json={json}
showMap={json.showMap}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论