1.0.6 • Published 8 months ago

@szlx/navigation v1.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

@szlx/navigation

uniapp 内部项目调用打开地图工具函数

Installtion

npm i @szlx/navigation

Usage

import Vue from 'vue'
import OpenLocation from '@szlx/navigation'

Vue.use(OpenLocation, {
  name: '$openMap',
  t: (name, opts) => i18n.t(name, opts)
})

export default {
  methods: {
    handleOpenMap() {
      this.$openMap({
        latitude: 39.909187,
        longitude: 116.397455,
        address: '北京天安门'
      })
    }
  }
}

Install Options

参数名说明类型必填默认值
name方法名stringfalse$openLocation
title标题stringfalse选择地图应用
cancelText取消文字stringfalse取消
showOpenFailed打开失败回调functionfalse$openLocation
ti18n.tfunctiontrue(k, o) => o?.default

name props

参数名说明类型必填默认值
latitude维度numbertrue-
longitude经度numbertrue-
address地址stringtrue-
1.0.2

8 months ago

1.0.1

8 months ago

1.0.6

8 months ago

1.0.5

8 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.0.0

12 months ago