npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue3-icinfo-amap

v0.0.4

Published

vue3 + ts 的高德地图-web服务(PC+移动)。如有问题,欢迎反馈,我的邮箱:[email protected]

Downloads

3

Readme

Vue 3 + TypeScript + Vite

Recommended IDE Setup

打包发布到 npm

1. npm run build:lib
2. 生成 dist 文件夹
3. npm publish

4. 使用组件的文件夹:npm i vue3-icinfo-amap

高德地图-web服务

npm install vue3-icinfo-amap

父级:main.ts 中:

import tenct from 'vue3-icinfo-amap';
const { AmapWeb } = tenct;
Vue.use(AmapWeb);

xxx.vue 中:

<AmapWeb
    keyAmap="xxxxxxxx"
    :mapVal="{lng: 120.209902,lat: 30.246567,}"
    @mapRes="mapRes"
/>

注意:这里做了 PC 端和移动端的判断,展示不同样式。
移动端:建议打开一个地图选择的页面;
PC端:建议一个弹框

参数:
    keyAmap: web服务的Key (注意是web服务)
    version: 版本号,目前默认 1.4.15
    serchMark: 能否搜索, 默认true
    moveMark:  能否移动, 默认true
    resValMark: 是否展示选中后的地址, 默认true
    btnMark: 确定-取消 是否显示, 默认true
    mapVal: {lng: 120.209902, lat: 30.246567,} 经纬度,默认杭州市

插槽:
    搜索 的 label, 默认文字“地址”
    <template v-slot:label></template>
    搜索 的 图标, 默认 放大镜
    <template v-slot:icon></template>

    确定-取消 按钮
    <template v-slot:footer-btn></template>

事件:
    @mapRes="mapRes"
    返回值:
        如果点击“取消”:直接返回 false

        如果点击“确定“:btnMark = true
        如果是拖拽改变地点了,btnMark = false

            btnMark: true || false,
            resVal: this.resVal, // 具体地址:省市区街道楼
            lng: this.LatLng.lng,// 经度
            lat: this.LatLng.lat,// 纬度
            resCode: this.resCode,// 省市区街道code "330102014000"