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

kong-tian

v1.0.2

Published

```js import TianMap from "kong-tian"; // 包名 import "kong-tian/tianmap.css"; Vue.use(TianMap); ```

Downloads

3

Readme

组件封装在弹窗内,用于新增/编辑页面

main.js

import TianMap from "kong-tian"; // 包名
import "kong-tian/tianmap.css";
Vue.use(TianMap);

1 首选,在列表页引入组件

# 获取天地图页面使用
<template>
#标记范围
<tian-Map ref="tianArea" @getLongLatArea="getLongLatArea" long="118.362881" lat="35.109849"></tian-Map>
#long="118.362881" lat="35.109849" 为默认值
</template>

<script>
export default{
    data(){
        return {

        }
    },
    methods:{
        # //点击确定的回调函数,data为边界数据
        getLongLatArea(data){
			console.log(data.length)
		},
		openMap(data) {
			#// data 打开时赋值边界范围
			#// this.$refs.tianArea.openMapAreaDetail(data);
			#// 也可以 没有默认值
			this.$refs.tianArea.openMapAreaDetail();
		},
    }

}
</script>

2 其次,在新增/编辑页面

<template>
        <el-form-item style="width:100%;" label="经纬度">
            <el-input v-model="villageForm.long_lat" class="item_input" disabled />
            <el-button type="primary" size="mini" style="margin-left:20px;" @click="openMap(villageForm.long_lat)">选取经纬度</el-button>
        </el-form-item>
        <el-form-item style="width:100%;" label="边界范围">
            <el-input v-model="villageForm.area_long_lat" class="item_input" v-show="!villageForm.area_long_lat" disabled />
            <el-button type="primary" size="mini" style="margin-left:20px;" v-show="villageForm.area_long_lat" @click="toMark(villageForm.area_long_lat)">已标记</el-button>
            <el-button type="primary" size="mini" style="margin-left:20px;" v-show="!villageForm.area_long_lat" @click="toMark(villageForm.area_long_lat)">请标记范围</el-button>
        </el-form-item>
</template>

<script>
export default{
    data(){
        return {
            villageForm:{
                long_lat:'',//经纬度
                area_long_lat:'',//范围
            }

        }
    },
    methods: {
        # 经纬度------------------
        # // 打开地图弹窗
        openMap(data) {
            this.$refs.tianLnglat.openMapLnglatDetail(data)
        },
        # // 标记完成后,接收经纬度
        getLongLat(obj) {
            this.villageForm.long_lat = obj
        },
        # 边界范围----------------
        # // 标记边界范围,
        toMark(data) {
            this.$refs.tianArea.openMapAreaDetail(data);
        },
        # // 标记完成后 接收边界范围
        getLongLatArea(obj) {
            this.villageForm.area_long_lat = obj
        
        },
    },
}
</script>