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 🙏

© 2026 – Pkg Stats / Ryan Hefner

vue-leaflet-location-select

v0.3.4

Published

an Component of Longitude and latitude of Location based on Vue.js

Readme

经纬度选择器

在线地址

开始

安装

npm install vue-leaflet-location-select
or
yarn add vue-leaflet-location-select

使用

import SelectLocation from "vue-leaflet-location-select";
import "vue-leaflet-location-select/library/vue-leaflet-location-select.css";
// 组件内部同步加载
components: {'select-location': SelectLocation}
// 组件内部异步加载
components: { 'my-component': () => import('vue-leaflet-location-select')}
}
<template lang="pug">
    div
        p 定位组件
        div(style="width: 480px; height: 28px; margin: 0 auto")
            select-location(v-model="location" :width="480" dialogWidth="600px" :toFixedNum="8")
    
</template>

props

| 参数名 | 类型 | 描述 | 默认值 | 必须 | | --- | --- | --- | --- | --- | | mapConfig | MapConfig | 地图加载的一些配置 | -- | 是 | | value(v-model) | Array | 组件的值 | [] | 是 | | mapId | String | map标识 | 'map' | 否 | | dialogWidth | String | 弹框宽度 | '600px' | 否 | | toFixedNum |Number | 经纬度有效位 | 6 | 否 | | isInput |Boolean | 是否显示输入框(特定场合只用定位功能) | true | 否 | | disable |Boolean | 组件禁用 | false | 否 | | width |Number | 组件宽度 | 320 | 否 | | customSearchFunction |() => void | 自定义搜索函数(返回数据必须是BaseLocation类型数组) | (searchStr):BaseLocation[] => {return []} | 否 |

BaseLocation

location: string = ''; // 具体位置经度在前, 维度在后 "120.22132,30.207384"
detailAddress?: string = ""; // 拼接出的详细地址
name?: string = ""; // 聚光中心

MapConfig

mapCenter: Array<number | string>  = [30.257881, 120.195923]; // 地图默认中心点
url?: string = "http://{s}.tile.osm.org/{z}/{x}/{y}.png";
maxZoom?: number = 18; // 最大缩放
minZoom?: number = 5; // 最效缩放
zoom?: number = 14; // 默认缩放
isSearch?: boolean = true;
searchConfigKey?: string = '9cb097cec23e465d5916ef63f23798db'; // 地图搜索应用key
searchConfigUrl?: string = 'http://restapi.amap.com/v3/place/text';

event

| 事件名 | 参数类型 | 描述 | | --- | --- | --- | | input | String[] | value修改 |

method

| 事件名 | 参数类型 | 描述 | | --- | --- | --- | | clearValue | -- | 清楚value | | destroyMap | -- | 销毁地图 |

slot

| 名称 | 描述 | | --- | --- | | customContent |地图自定义内容 |

提示

  1. 组件内部集成leaflet.js,不建议使用全局注册,按需加载即可。
  2. 地图定位使用EPSG3857坐标。
  3. 组价基于elementui。

版本更迭

  1. 数据流修改为双向绑定;
  2. 添加搜索列表功能