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

meixicheckstaff

v2.0.14

Published

## Project setup ``` npm install ```

Readme

meixicheckstaff

用于勾选员工/部门的业务组件

项目结构

|-- lib   ------------------------------------打包后的文件夹
|   |-- demo.html
|   |-- index.d.ts
|   |-- index.d.ts.map
|   |-- index.js
|   |-- meixicheckstaff.common.js
|   |-- meixicheckstaff.umd.js
|   |-- meixicheckstaff.umd.min.js
|   |-- config
|   |   |-- config.d.ts
|   |   |-- config.d.ts.map
|   |   |-- config.js
|   |   |-- enDict.d.ts
|   |   |-- enDict.d.ts.map
|   |   |-- enDict.js
|   |   |-- selectUserConfig.d.ts
|   |   |-- selectUserConfig.d.ts.map
|   |   |-- selectUserConfig.js
|   |-- control
|       |-- useSelectStaff.d.ts
|       |-- useSelectStaff.d.ts.map
|       |-- useSelectStaff.js
|-- packages -------------------------------------项目主要文件夹
|   |-- index.js
|   |-- index.ts ---------------------------------入口文件
|   |-- component --------------------------------vue工程文件
|   |   |-- dialogSelectStaff.vue
|   |   |-- selectStaff.vue
|   |   |-- selectUser
|   |       |-- selectDept.vue
|   |       |-- selectDictLetter.vue
|   |       |-- selectUserAndDeptTag.vue
|   |       |-- selectUserFrame.vue
|   |       |-- selectUserGroup.vue
|   |       |-- selectUserGroupItem.vue
|   |       |-- selectUserGroupWrap.vue
|   |       |-- selectUserWrap.vue
|   |-- config -----------------------------------配置项
|   |   |-- config.ts
|   |   |-- enDict.ts
|   |   |-- selectUserConfig.ts
|   |-- control
|       |-- useSelectStaff.js
|       |-- useSelectStaff.ts```

安装

npm install meixicheckstaff

组件预览

状态为选择员工的界面预览

状态为选择账户的界面预览

状态为选择部门的界面预览

状态为选择部门的界面预览

//函数共导出三个实例对象

//index.ts
export {
    //通过该实例类可以通过函数式渲染相关选择的组件
    useSelectStaff,
    //vue工程文件 在vue工程文件中通过html标签渲染
    //使用方式<selectStaff></selectStaff>
    //相关props及emit事件见下面
    selectStaff,
    // 如果需要通过函数式渲染选择员工组件需要通过该函数设置相关配置
    // [1,2] 第一个参数默认是1 指的是是否选择员工/账户  第二个参数 1是指员工 2是指选的是部门 3是是否一起选择员工与部门
    //setOptions(1, 2);
    setOptions
}

useSelectStaff 相关api


interface useSelectStaff {
    // 渲染选择员工
    useSelectStaffOfDialog: (value: any, checkType: checkType, cb: Function) => void
    // 渲染选择部门
    useSelectDeptOfDialog: (value: any, checkType: checkType, cb: Function) => void
    // 渲染选择员工与部门
    useSelectStaffAndDeptOfDialog: (value: any, cb: Function) => void
}

selectStaff

props

| 属性 | 类型 | 默认值 | 可选值 | 描述 | |-----------|---------|--------|------------------|----------------------------| | type | Number | 1 | 1,2,3 | 1是员工2是部门3是员工与部门 | | checkType | String | single | single/multiple | single是指单选/multiple是指多选 | | userType | | 1 | 1/2 | 1是员工/2是账户 | | departId | Array | 无 | 无 | 当type类型为1时生效,查询指定部门下的员工与账户 | | disabled | Boolean | false | true/false | 是否禁用选择 | | value | Array | | | 绑定及回显的值(如需要回显请参考以下代码) |

emit事件

| 名称 | 参数 | 描述 | |-------|-------|--------------------| | input | value | 当v-model绑定的值被修改时触发 |

value回显参考代码

//这里的limitDept为v-model绑定的值
//goodsCouponLimitDeptVOList后端返回的值
this.limitDept = goodsCouponLimitDeptVOList.map((item) => {
    return {
        name: item.deptName,
        //如果是
        // 员工需改为staffId
        // 账户需改为accountId
        deptId: item.deptId,
        // 员工需改为staffId
        // 账户需改为accountId
        id: `deptId${item.deptId}`
    };
});