Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

moguli_library

Package Overview
Dependencies
Maintainers
1
Versions
195
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moguli_library

魔古力的公共库

latest
npmnpm
Version
0.6.25
Version published
Maintainers
1
Created
Source

使用规范

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" />

Keywords

moguli

FAQs

Package last updated on 05 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts