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

element-business

v1.0.8

Published

```apple js npm version patch npm publish ``` #### 业务组件包 ```

Readme

发布

npm version patch
npm publish

业务组件包


// main.js 中初始化

import {
  mCoreComponents,
  mCoreDirectives,
  mCoreAxios,
  mCoreRootHandel,
  layer,
  mCoreUtils
} from './assets/lib/m-business/index'


function mCoreInstall() {
 //自行设置 lang来源
  let lang = 'zhCN';
  let dict = require('./json/dict_' + lang + '.json');
  store.dispatch('mCore/setDictList', dict);
  let error = require('./json/error_' + lang + '.json');
  store.dispatch('mCore/setErrorList', error);
  //设置代理前缀
  store.commit('mCore/setProxy','iotDriver');
  
  Vue.prototype.$rh = {
    confirm:mCoreRootHandel.mconfirm
  }
  Vue.prototype.$mUtils = mCoreUtils;
  Vue.prototype.$layer = layer;
  Vue.prototype.$axios = new mCoreAxios({
    formData: true,//请求格式改成form
    timeout: 5000,// 请求超时时间
    retry: 2,//请求超时重复发次数
    retryDelay: 1000,//请求超时重复发间隔
    //发送请求之前回调
    onRequestBefore: function onRequestBefore(config) {
      var url = config.url;
      if (url.substr(0, 1) === '/') {
        url = url.substr(1);
      }
      if (process.env.NODE_ENV !== 'development') {
        config.url = config.url.replace(/^\/?magusdip/, '')
      }
      return config;
    },
    //返回成功回调
    onResponseSuccess: function onResponseSuccess(response) {
      if (response.data && response.data.flag === -999 && !logoutFlag) {
        console.warn("Timeout", response.config.url);
        logoutFlag = true;
        Store.dispatch("login/clearloginOut");
        if (response.config.url.indexOf("logout") < 0) {
          // alert('Timeout');
          // location = '/';
        }
      }
      return response;
    },
  });
  window.mBusinessEventBus = new Vue();
  for (let key in mCoreDirectives) {
    if (mCoreDirectives.hasOwnProperty(key)) {
      Vue.directive(key, mCoreDirectives[key]);
    }
  }
  for (let key in mCoreComponents) {
    if (mCoreComponents.hasOwnProperty(key)) {
      Vue.component(key, mCoreComponents[key]);
    }
  }

}

mCoreInstall();

//store 中引入 模块
import {mCoreStore} from "../assets/lib/m-business/index";

export default new Vuex.Store({
  state: {},
  mutations: {},
  actions: {},
  modules:{
    mCore:mCoreStore
  }
})
//需要初始化的时候 载入字典 我选择 在App.vue 中混入
const i18nMixins = {
  created() {
    let dict = require('../json/dict_' + (this.lang || 'zhCN') + '.json');
    this.$store.dispatch('mCore/getDictList', dict);
  },
  computed: {
    lang() {
      return this.$store.state.mCore.lang
    }
  },
  watch: {
    lang(n) {
      let dict = require('../json/dict_' + (n || 'zhCN') + '.json');
      this.$store.dispatch('mCore/getDictList', dict);
    }
  }
};
export {
  i18nMixins
}