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

vue2-element-dict

v1.3.6

Published

vue2基于element-ui组件库的字典组件

Downloads

488

Readme

vue2-element-dict

vue2-element-dict 是基于 element-ui 组件库开发而成的字典组件,详细请阅读官方使用文档题

vue2-element-dict

微信公众号

公众号二维码

抖音号

公众号二维码

微信赞助

开发不易,如果对您有所帮助,可赞助作者,利于官网服务器运营。您的支持,是我继续努力的最大动力。

赞助码

更新日志

1.3.6

  1. 【修复】修复动态组件及动态搜索组件事件绑定无效问题。使用方式为

on: {
  change: function(val) {}
  input: function(val) {}
}

1.3.5

  1. 【新增】新增el-auto-height-dict组件,计算页面剩余高度

  2. 【新增】新增el-autocomplete-emial-dict组件,自动完成邮箱

  3. 【新增】新增v-close-dropdown指令, 实现滚动时清除下拉选项弹框

  4. 【优化】优化部分问题

1.3.4

  1. 【优化】dict-dynamic-search组件新增rulesidField属性配置,list 的选项配置新增hiddenvisibleshowRulesshowRuleTypevalidatorRuleType配置,实现表单联动及快捷校验。同dict-dynamic-components组件。

  2. 【优化】修复dict-dynamic-components组配置 showRuleType 为 validate 且 showRules 配置校验多个字段时,如 sex,name, name 本身存在错误提示,sex 改变时会移除 name 的校验的问题,重置按钮功能做了优化

1.3.3

  1. 新增】新增el-dynamic-search-dict动态搜索组件,可以实现多栏收起展开功能

2.【优化】el-dynamic-components-dict组件新增样式,实现表单样式占满

1.3.2

1.【优化】项目初始化时,若字典版本号与缓存不一致,将批量请求缓存中所有需通过接口获取的字典类型数据,并更新本地缓存。

2.【优化】修改动态组件默认渲染值由原来的 formData 改为组件配置里面的 value 值,null 兜底

3.【优化】字典配置新增 delayTime 属性(单位:毫秒,默认值:null),用于配置延迟响应时间。当设置为非 null 值(如 300)时,启用防抖合并请求:在指定延迟时间内,将多个字典类型请求合并,延迟结束后统一调用批量接口一次性获取所有字典数据。

​ 注意:为了支持还有部分后端人员开发的接口不支持请求多个字典类型,此版本将 delayTime 设置为 null,避免版本更新导致这些用户报错而不知所措。后续版本可能会把默认值改为 300,请提前知悉。

4.【优化】JSON.parse(浏览器缓存数据)出错时捕获异常

5.【新增】新增暴露debounce防抖和throttle节流方法

6.【优化】新增timeout配置,解决字典数据请求方法请求超时问题

7.【新增】新增el-descriptions-dict组件,配置list属性遍历渲染descriptions-item

1.3.1

  1. 【优化】日期格式化兼容 ISO 8601 日期时间格式

  2. 【修复】修复自定义日期方法时,传递日期格式无效问题

1.3.0

  1. 【优化】el-select-dict组件keyValue属性配置为 true 时 由原先绑定值为对象 改为绑定值为字符串或数字

  2. 【优化】el-tabs-dict插槽名由原先的既可改为tabs-item-值,addAllText 属性配置的插槽名则为tabs-item

1.2.9

  1. 【优化】el-select-checkbox组件 新增addAllText属性,实现全选功能,全选选项 label 值就是addAllText属性的值

1.2.8

  1. 【优化】el-radio-dictel-radio-button-dictel-select-dictel-tabs-dict四个组件 新增addAllText属性,实现选项头部新增一个空字符串值的选项

1.2.6

  1. 【优化】新增el-input-dict组件

  2. 【优化】新增el-buttons-dict组件

  3. 【优化】新增el-dynamic-header-table-dict组件

  4. 【优化】新增el-dynamic-components-dict组件

  5. 【修复】调整几处细微的逻辑和样式细节

1.2.5

  1. 【优化】usuallyGetDictTypes 配置了 localDictCodes 重复的字典类型时,给出警告,并且过滤掉本地存在的字典类型。

1.2.3

  1. 【优化】dictConfig 新增 getLoginStatusFunc()字段,配置获取登录状态(即有无登录凭证)的方法,return true 为已登录,false 为未登录,默认值为 return true

  2. 【优化】dictConfig 新增 loginStatusChangeFunc(val)字段,登录状态改变时的回调方法 val 为 true 为已登录,false 为未登录。默认值为 null

  3. 【优化】解决当获取字典值接口需要登录凭证时,配置了 isGetAll 为 true 或者有配置 usuallyGetDictTypes 时,立马调用获取字典接口会报错的 bug。此版本会待 getLoginStatusFunc()配置的值返回 true 时才会触发获取字典接口。

1.2.2

  1. 【优化】树形数据过滤器及方法间隔符有 , 改为 /

  2. 【优化】el-select-dict、el-radio-dict、el-radio-button-dict、el-checkbox-dict、el-checkbox-button-dict、el-tabs-dict 组件新增 data 属性配置自定义选项数据,format 属性配置自定义选项格式

1.2.1

  1. 【优化】GetLabelByCodesFilter(vals, type, options) options 新增 emptyText 属性配置,用于 options 未设置 defaultVal 时,vals 中的某一项有值则显示该值,无值显示 emptyText,emptyText 默认值为“--”
  2. 【优化】GetTreeLabelByCodesFilter(vals, type, options) options 新增 emptyText 属性配置,用于 options 未设置 defaultVal 时,vals 中的某一项有值则显示该值,无值显示 emptyText,emptyText 默认值为“--”
  3. 【优化】el-tabel-column 组件新增 emptyText 属性配置,用于 dictType 类型或 dictTreeType 类型且未设置 defaultVal 时,可实现有值但是找不到对应字典类型则显示该值,为空时则显示 emptyText, emptyText 默认值为“--”
  4. 【优化】姓名脱敏优化,新增复姓,慕容云海 =》 慕容+海 欧阳锋 =》 欧阳+ 沈小布 =》 沈+布 王涛 =》 王+

1.2.0

  1. 【优化】FormatDate 兼容 10、12、14 位连续数字字符串或数字格式

1.1.8

  1. 【优化】FormatDate 兼容 4、6、8 位连续数字字符串或数字格式

1.1.6

  1. 【优化】修复 使用 GetDictObjByDictTypes 方法对于 缓存中已存在的 字典数据 未能返回 的 bug

1.1.5

  1. 【优化】修复 使用 await GetDictObjByDictTypes 方法时 无法 顺延继续获取接口的 bug GetDictObjByDictTypes 新增 return Promise

1.1.3

  1. 【优化】修复 GetDictObjByDictTypes 获取的字典数据会产生 undefined: true/false 的问题

1.1.2

  1. 【优化】el-cascader-dict 组件的 props 属性新增 idField 字段配置用于配置数组数据根据什么 id 字段转化为树形结构数据
  2. 【优化】el-cascader-dict 组件的值的配置字段从原先的 treeSetting.idField 改为现在的 format.value 配置
  3. 【优化】treeSetting.idField 配置作用改为仅用于数组转树形结构判断依据使用
    setting() {
      const props = this.$attrs.props??{}
      props.disabled = props.disabled??this.dictConfig.format.disabled
      props.value = props.value??this.dictConfig.format.value
      props.label = props.label??this.dictConfig.treeSetting.labelField
      props.children = props.children??this.dictConfig.treeSetting.childrenField
      props.leaf = props.leaf??this.dictConfig.treeSetting.leafField
      return props
    },
    options(){
      const props = this.$attrs.props??{}
      const newProps = {
        idField: props.idField??this.dictConfig.treeSetting.idField,
        labelField: props.label??this.dictConfig.treeSetting.labelField,
        childrenField: props.children??this.dictConfig.treeSetting.childrenField,
        leafField: props.leaf??this.dictConfig.treeSetting.leafField
      }
      const treeSetting = Object.assign(this.dictConfig.treeSetting, newProps)
      const treeArr = JSON.parse(JSON.stringify(this.list))
      const data = ListToTree(treeArr, treeSetting)
      // 限制层级
      if (this.maxLevel) {
        this.filterLevel(data, +this.maxLevel)
      }
      return data
    }

1.1.1

  1. 【优化】el-table-column-dict 组件中 maskType 属性和 dictTypeNode 支持传入空字符串

1.1.0

  1. 【优化】修复部分问题
  2. 【优化】新增 getDictDataObjByKeys(keys, callback(data)) 获取字典方法 回调函数方式
  3. 【优化】新增 killAwaitPromise,解决 promise 污染问题

1.0.9

  1. 【优化】新增 getDictData 和 getDictDataByKey 两个获取字典数据方法

1.0.8

  1. 【优化】修复字典包全局配置 disabledDataFun 和 filterDataFun 无效问题
  2. 【优化】将字典包全局配置 disabledDataFun 修改为接收 item 入参,返回 true 则禁选 返回 false 则非禁选,item 为某字典类型的某一项,默认返回 false

1.0.6

  1. 【修复】mask 方法设置 start 默认值为 0,当配置的数值加起来大于字符串长度时 返回原先字符串不脱敏

1.0.5

  1. 【修复】新增 isGetAll、usuallyGetDictTypes、usuallyGetDictTypesByApi 三个属性配置
  2. 【优化】去除暴露字典过滤器相关的方法

1.0.3

  1. 【修复】修复 el-tabs-dict 组件 v-model 设置默认值时无效问题,及修复 dictChange 改变事件返回值错误问题

1.0.2

  1. 【优化】format 配置项新增字段,可配置 color,type,disabled 对应字段。
  2. 【优化】各字典组件的 disabledDataFun 配置项修改,接收的参数为每个项的对象,如需禁用则配置该 item 项返回 true
  3. 【优化】text,link,button,tag 组件配置 color,type 属性字典数据优先级最低,disabled 属性字典数据优先级最高 不可覆盖
  4. 【优化】el-tabs-dict 组件优化,实现可插入插槽,插槽名字为该值名字即可。

1.0.1

  1. 【优化】formatDate 方法兼容世界标准格式时间

1.0.0

  1. 【修复】修复 el-table-column-dict 组件 dictTypeNode maskType 属性值校验方法名错误问题

0.0.9

  1. 【修复】修复 el-cascader-dict 和 el-tree-dict 组件属性及事件无穿透的问题

0.0.8

  1. 【优化】脱敏方法,desensitization = (str, options) options 为字符串时,直接表示脱敏类型

0.0.6

  1. 【优化】dictConfig 配置中的 format 新增 type,color,disabled 属性配置。
  2. 【优化】el-button-dict 组件新增 judgeDisabledFun 配置,judgeDisabledFun > disabled > 字典数据的 disabled 值 > 默认值 false, judgeTypeFun > type > 字典数据的 type 值 > 默认值 primary,
  3. 【优化】el-text-dict 组件新增 judgeDisabledFun 配置,judgeDisabledFun > disabled > 字典数据的 disabled 值 > 默认值 false, judgeTypeFun > type > 字典数据的 type 值 > 默认值 primary,
  4. 【优化】el-link-dict 组件新增 judgeDisabledFun 配置,judgeDisabledFun > disabled > 字典数据的 disabled 值 > 默认值 false, judgeTypeFun > type > 字典数据的 type 值 > 默认值 primary,
  5. 【优化】el-tag-dict 组件新增 judgeColorFun 配置,judgeColorFun > disabled > 字典数据的 disabled 值 > 默认值 false, judgeTypeFun > type > 字典数据的 type 值 > 默认值 primary,
  6. 【优化】el-table-column-dict 组件新增 dictTypeNode 配置,用于配置使用什么标签 ["button", "link", "text", "tag"] 仅对有配置 dictType 属性的有效

0.0.3

  1. 【优化】优化全局过滤及全局禁用方法在组件中重复使用问题,注意:全局过滤及禁用方法必定执行
  2. 【优化】el-cascader-dict 组件及 el-tree-dict 组件新增 maxLevel 属性,限制树形结构层级

0.0.2

  1. 【修复】修复 el-radio-dict、el-radio-button-dict 组件使用无效问题
  2. 【修复】修复版本号 version 英文书写错误写成 verssion 导致的版本相关问题
  3. 【优化】desensitization 脱敏方法新增 maskType 为 none 的类型 为不脱敏

0.0.1

  1. 【修复】修复 el-table-column-dict 组件配置脱敏无效问题

0.0.0

vue2-element-dict 最初版本