# me-admin-amap

> 一个用于选中坐标的高德地图选择弹窗，基于Element-UI

Latest version **0.0.3** (published 2019-06-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install me-admin-amap
pnpm add me-admin-amap
yarn add me-admin-amap
bun add me-admin-amap
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2019-06-03 |
| First published | 2019-06-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 1 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 7 |
| Author | 易墨 |
| Maintainers | yimogit |
| Keywords | vue, amap, element-ui |

## Links

- npm: https://www.npmjs.com/package/me-admin-amap
- Repository: https://github.com/yimogit/me-admin-sdk
- Homepage: https://github.com/yimogit/me-admin-sdk#readme
- Issues: https://github.com/yimogit/me-admin-sdk/issues
- npm.io page: https://npm.io/package/me-admin-amap

## Dependencies (2)

- [vue](https://npm.io/package/vue.md) ^2.6.10
- [element-ui](https://npm.io/package/element-ui.md) ^2.7.0

## Recent versions

- 0.0.3 (latest) — 2019-06-03
- 0.0.2 — 2019-06-03
- 0.0.1 — 2019-06-03

## README

# me-admin-amap

高德地图选择地址的弹窗封装，依赖于 Element-UI，如果有默认数据，需要先填充数据再初始化

`npm install --save me-admin-amap`

## 效果图

![demo](https://github.com/yimogit/me-admin-sdk/raw/master/packages/me-admin-amap/example/images/demo.jpg)

## 使用示例

```html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>me-admin-amap的使用</title>
    <!-- <script type="text/javascript" src="https://cdn.staticfile.org/vue/2.6.10/vue.js"></script> -->
    <script type="text/javascript" src="../../dist/libs/vue/index.js"></script>
    <link rel="stylesheet" href="../../dist/libs/element-ui/index.css" />
  </head>

  <body>
    <div id="app">
      <v-me-admin-amap
        key="a1"
        v-if="isLoadEnd"
        :lat="form.addressLatitude"
        :lng="form.addressLongitude"
        :address="form.address"
        :addressDetail="form.addressDetail"
        @select="selectAmap"
      ></v-me-admin-amap>
      <pre>
      {{form}}
    </pre
      >
      <v-me-admin-amap2
        key="a2"
        v-if="isLoadEnd"
        :lat="form.addressLatitude"
        :lng="form.addressLongitude"
        :address="form.address"
        :addressDetail="form.addressDetail"
        @select="selectAmap"
      />
    </div>
    <script
      type="text/javascript"
      src="../../dist/libs/element-ui/index.js"
    ></script>
    <script type="text/javascript" src="../../dist/me-admin-amap.js"></script>
    <script type="text/javascript">
      // Vue.use(window.ELEMENT)
      window.Vue.use(MeAdminAmap, {
        name: 'v-me-admin-amap',
        mapKey: 'da86b9bd9ed7cd346e0a028d004fbb76'
      })
      new Vue({
        name: 'app',
        el: '#app',
        components: {
          'v-me-admin-amap2': MeAdminAmap.instance
        },
        data: {
          isLoadEnd: false,
          form: {
            addressLatitude: 0,
            addressLongitude: 0,
            address: null,
            addressDetail: null
          }
        },
        mounted() {
          setTimeout(() => {
            this.isLoadEnd = true
          }, 1000)
        },
        methods: {
          selectAmap(e) {
            if (e == null) {
              alert('请选择地址')
              return
            }
            this.form.addressLatitude = e.lat
            this.form.addressLongitude = e.lng
            this.form.address = e.address
            this.form.addressDetail = e.addressDetail
          }
        }
      })
    </script>
  </body>
</html>
```

---
_Source: https://npm.io/package/me-admin-amap · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
