1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <template>
- <view class="content">
- <mi-map ref="miMap" tipText="mi-Map" @updateAddress="updateAddress">
- </mi-map>
- </view>
- </template>
- <script>
- import miMap from '../../components/mi-map/mi-map.vue'
- export default {
- components: {
- miMap
- },
- data() {
- return {
- // mapShow: false,
- positionObj: {},
- };
- },
- onNavigationBarButtonTap(e) {
- if (e.index == 0) {
- this.inBack()
- }
- },
- methods: {
- inBack() {
-
- },
- // 打开地图
- openMap() {
- this.mapShow = true
- },
- // 更新地址并关闭地图
- updateAddress(addressObj) {
- this.positionObj = addressObj
- uni.$emit("addressData", this.positionObj)
- uni.navigateBack({})
- },
- },
- }
- </script>
- <style lang="scss">
- .content {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- }
- .address{
- // margin-top: 1rem;
- }
- </style>
|