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

developer-website

v0.1.0

Published

1、程序在进入main.js的过程中,可以看到首先渲染Index.vue组件 import Vue from 'vue/dist/vue.js' import VueRouter from 'vue-router'; import ElementUI from 'element-ui'; import 'element-ui/lib/theme-chalk/index.css'; //import Map,{createLayer} from 'vue-o

Downloads

2

Readme

1、程序在进入main.js的过程中,可以看到首先渲染Index.vue组件 import Vue from 'vue/dist/vue.js' import VueRouter from 'vue-router'; import ElementUI from 'element-ui'; import 'element-ui/lib/theme-chalk/index.css'; //import Map,{createLayer} from 'vue-openlayer-map'; import Map,{createLayer,filterKey,clearSpatial,addAlarmFlash,removeOverLayeById,clearMap,radarChart} from 'vue-openlayer-lx' import router from './router.js'; import Index from './Index.vue'; Vue.use(VueRouter); Vue.use(ElementUI); Vue.use(Map); Vue.prototype.createLayer = createLayer; Vue.prototype.clearSpatial = clearSpatial; Vue.prototype.clearMap = clearMap; Vue.prototype.filterKey = filterKey; Vue.prototype.addAlarmFlash = addAlarmFlash; Vue.prototype.radarChart = radarChart; Vue.prototype.removeOverLayeById = removeOverLayeById; Vue.config.productionTip = false; new Vue({ el: '#app', router, render: h => h(Index), }); 2、进入index.vue组件后,HeaderTemplate为顶部,router-view为路由

<template>
    <el-container id="app">
        <el-header class="header">
            <header-template :fun="selectHeader"/>
        </el-header>
        <router-view></router-view>
    </el-container>
</template>
import HeaderTemplate from './components/HeaderTemplate.vue'
export default {
    name: 'app',
    data() {
        return {}
    },
    components: {
        HeaderTemplate
    },
    methods: {
        /**
         * 菜单选择回调方法
         * @param key
         * @param path
         */
        selectHeader(code, item) {
            if (item.target == "_blank") {
                //页面触发类型为弹出方式
                window.open(item.path);
            } else {
                //页面触发类型为路由
                this.$router.push({
                    name: item.path,
                    params: {
                        time: (new Date()).getTime(),
                        headerCode: code
                    }
                });
            }
        }
    }
}

3、程序首先进入的组件根据router.js路由进入websiteTemplate {path: '/', redirect: '/websiteTemplate'} websiteTemplate中包含两部分:代码编辑区域@/components/AceTemplate.vue;地图展示区域@/components/MapTemplate.vue(其中MapTemplate中再包含sl-map) 4、左侧树Menu.vue(包含MenuTemplate.vue),在进行路由的时候包含Menu(左侧树节点)以及含有它的子组件webSiteTemplate(除了左侧树节点外右侧的所有区域) {path: '/', redirect: '/websiteTemplate'}, { path: '/menu/:time', name: 'Menu', component: Menu, props: true, children: [ { path: 'websiteTemplate', name: 'WebsiteTemplate', component: WebsiteTemplate },

            ]
        },

5、Website.vue为地图操作界面的vue文件,和API的关系不大