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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@alvin-cqx/alvin-vue

v1.0.1

Published

elpis ###企业端项目是个全栈的项目

Readme

elpis

企业端项目是个全栈的项目

model配置

{
  mode: "dashboard"; //模板类型,不同模板类型对应不同的模板数据结构
  name: ""; //名字
  desc: ""; //描述
  icon: ""; //图标
  homePage: ""; //首页
  // 头部菜单
  menu: [
    {
      key: "", //菜单唯一描述
      name: "", //菜单名称
      menuType: "", //菜单类型 枚举值 group /module

      //当menuType==group
      // 可递归
      subMenu: [{}],

      //当menuType==module
      moduleType: "", //枚举值 sider/iframe /custom/schema

      // moduleType==sider
      siderConfig: {
        menu: [{}],
      },

      //  moduleType==iframe
      iframeConfig: {
        path: "", //iframe路径
      },

      // moduleType==custom
      customConfig: {
        path: "", //自定义路径
      },

      //moduleType==schema
      schemaConfig: {
        api: "", //数据源api,遵循RESTFUL规范
        schema: {
          type: "object",
          properties: {
            key: {
              ...schema, //标准schema配置
              type: "", //字段类型
              label: "", //字段中文名字
              // maxLength: 10, //字段长度限制
              // minLength: 5,

              // 字段在table中的相关配置
              tableOption: {
                ...elTableColumnConfig, //标准el-table-column基础配置
                toFixed: 2, //保留几位小数
                visible: true, //默认为true(false 或者不配置,不展示在table展示)
              },
              // 字段在search中相关配置
              searchOption: {
                ...eleComponentCofing, //标准 el-componet-column配置
                // 当comType==input时
                comType: "input", //类型
                default: "", //默认值

                // 当comType==select时
                // 是否自定义下拉列表对应的
                enumList: [], //下拉列表
                // 自定义key value
                customizeList: {
                  label: "",
                  value: "",
                },
                // 当comType==dynamicSelect,多一个api请求
                api: "",

                // 当comType==datePicker
                // 时间控件的一些配置
                datePickerOption: {
                  //type: date daterange
                  type: "date",
                  placeholder: "Pick a day",
                  // 当 type:daterange,他选择时间返回的是个数组,我们要特殊处理
                  dateParams: ["startTime", "endTime"],
                },
              },

              // 字段在不同的组件中相关配置,前缀对应componentConfig中的键值
              //如:componetConfig.createForm 这里对应createFormOption
              // 字段在createForm的配置
              createFormOption: {
                ...eleComponentCofing, //标准 el-componet-column配置
                comType: "input", //控件类型
                visible: true, //是否展示,默认为true
                disabled: false, //是否禁用,默认为fasle
                default: "", //默认值

                // 当comType==select时
                // 是否自定义下拉列表对应的
                enumList: [], //下拉列表
              },
              editFormOption: {
                ...eleComponentCofing, //标准 el-componet-column配置
                comType: "input", //控件类型
                visible: true, //是否展示,默认为true
                disabled: false, //是否禁用,默认为fasle
                default: "", //默认值
              },
              detailPanelOption: {},

              required: [], //必填字段
            },
          },
        },
        //表格配置
        tableConfig: {
          headerButtons: [
            {
              label: "", //按钮中文名
              eventKey: "", //按钮事件名
              eventOption: {}, //按钮具体配置
              ...elButtonConfig, //el-button 基础配置
            },
          ],
          rowButtons: [
            {
              label: "", //按钮中文名
              eventKey: "", //按钮事件名
              eventOption: {
                // 举例子
                // 当eventKey==remove
                params: {
                  // key:参数的键
                  // value:参数的值,格式为 schema::tableKey的时候,到table中找对应字段
                  key: value,
                },

                // 当eventKey==showComponet,就让他弹出组件,组件名字
                compName: "",
              }, //按钮具体配置
              ...elButtonConfig, //el-button 基础配置
            },
          ],
        },
        searchConfig: {}, //搜索配置
        //动态组件
        componentConfig: {
          // create-form 表单配置
          createForm: {
            title: "", //标题
            saveBtnText: "", //保存按钮文字
          },
          // 修改表单配置
          editForm: {
            mainKey: "id", //id
            title: "", //标题
            saveBtnText: "", //保存按钮文字
          },
          // 详情
          detailPanel: {
            mainKey: "id", //id
            title: "", //标题
          },

          // 支持用户动态添加
        },
      },
    },
  ];
}

服务端启动

const { serverStart } = require("@alvin-cqx/alvin-vue");

serverStart({ name: "ElpisDemo", homePath: "/view/project-list" });

自定义服务端

  • router-schema

  • router

  • controller

  • service

  • extend

前端构建

const { frontendBuild } = require("@alvin-cqx/alvin-vue");

frontendBuild(process.env._ENV);

自定义页面拓展

1.在app/pages/目录下写入口 entry.xxx.js

dashboard / custom-view 自定义页面拓展

1.在 app/pagas/dashboard/xxxx 下写页面

dashboard / schema-view / componets 动态组件拓展

1.在app/pages/dashboard/compiex-view/schema-view/componets 下写组件

2.配置到app/pages/dashboard/compiex-view/schema-view/componets/component-config.js

schema-form 控件拓展

1.在app/widgets/schema-form下写控件

2.配置到app/widgets/schema-form/form-item-config.js

schema-search控件拓展

1.在app/widgets/schema-search下写控件

2.配置到app/widgets/schema-search/schema-item-config.js