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

vuex-modules-expand

v0.0.5

Published

这是一个vuex按模块动态加载插件

Downloads

12

Readme

Install

npm install vuex-modules-expand

Import

// main.js
import { createApp } from "vue"; // 依赖vue (rely on Vue)
import store from "./store";
import vuexModule from "./vuexModule-expand"; // vuex按模块需求动态载入(Dynamic loading as required by the module)

Use

// main.js
app.use(vuexModule);// 注册插件(To register the plugin)

Vue

<template>
  <div>
  </div>
</template>

<script>
// @ is an alias to /src
import { onBeforeMount, toRefs, reactive, getCurrentInstance } from "vue";
// 从 vuex 中导入 useStore 方法
import { useStore } from "vuex";
/**
 * 重要参数说明:
 * isVuex--在组件模块中定义此属性,为boolean类型 接收值 true/false;
 * fitVuexModuleName--在组件模块中定义此属性,为String类型 或者Array<String> 类型,接收值例如:"Login"/["Login", "ContractFilmList"];
 */
export default {
  isVuex: true, // 是否使用动态加载的vux模块
  fitVuexModuleName: "Contract", // 如果不指定 默认取值name
  name: "contant", // 如果不指定 默认取此值
  components: {},
  setup() {
    return {};
  },
};
</script>

<style lang="scss" scoped>
</style>

Description

此插件用于按模块化动态分割按需注册vuex

// this.$options对象即为例如.vue文件中 export default 导出的模块属性对象集合
// this.$options.fitVuexModuleName 取值取的为自定义使用vuex仓库的指定模块的名称。 如果不指定 默认取值 this.$options.name 模块名 name

Author List

@kaysem