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

moguli_library

v0.6.25

Published

魔古力的公共库

Downloads

20

Readme

使用规范

1.必须安装以下相关插件
{
    "@element-plus/icons-vue": ">=2.1.0",
    "element-plus": ">=2.3.0",
    "vue": ">=3.4.0",
    "axios": ">=1.3.0"
}
2.运行
npm run docs:dev # 启动文档预览

基础使用配置

import {
    utils, // 工具
    components, // 组件
    features, // 业务型组件
    hooks, // hook 函数
    configs, // 配置
    interfaces // 接口
} from "moguli_library";

// 需要配置参数
import { changeConfigs, configs } from "moguli_library/configs";
// 使用 changeConfigs 改变配置
changeConfigs({
    baseUrl: "/development",
    root: "http://192.168.100.249"
});
// 查看全部配置
console.log(configs);

// 使用 权限和过滤条件
import { usePermissionJudge, useFilterDict } from "moguli_library/hooks";
const filterDict = useFilterDict();
const { judgeTagByPath } = usePermissionJudge(params:{appid:8,id:1,type:2});

judgeTagByPath.value(apiPath:string)
<template>
    {{ judgeTagByPath(apiPath) }}
    v-if="judgeTagByPath(apiPath)"
</template>

2. 进阶业务组件

--导出数据组件

import { MFExportDataDialog } from "moguli_library/features";

<MFExportDataDialog
            v-model="model"
            {/* 需要时间 */}
            needDate
            {/* 需要是否过滤 */}
            needFilter
            {/* 列 列表 */}
            :columns="options"
            {/* 列 id */}
            nodeKey="id"
            {/* 列 label */}
            nodeLabel="label"
            {/* disabled 确定按钮 ()=>void */}
            :disabledHandler="onDisabledHandler"
            {/* 确定函数 具有传参数据和说明 */}
            @confirm="onConfirmExportData"
        />
-- 公式配置
import { MFFormulaConfigDialog } from "moguli_library/features";
const dialogValue = ref(false);
const bindParams = {
    appid: 14,
    id: 1
};
// 可传递参数 columns ,录入title,显示label,key为id

<MFFormulaConfigDialog v-model="dialogValue" v-bind="bindParams" code="return 111" @confirm="onConfirmCodeEvent" />