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

定位组件修改.

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