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

zy-vue-library

v1.1.5

Published

```bash # npm npm install zy-vue-library

Readme

zy-vue-library

📦 安装

# npm
npm install zy-vue-library

# yarn
yarn add zy-vue-library

# pnpm
pnpm add zy-vue-library

环境要求

  • Node.js >= 18.0.0
  • Vue >= 3.5.0
  • Element Plus >= 2.11.0

🔨 使用

按需导入

import { AppTable, AppFormBuilder, useListData } from 'zy-vue-library'

📖 组件

AppFormBuilder - 动态表单构建器

AppSearch - 搜索表单

AppUpload - 文件上传

AppEditor - 富文本编辑器

AppImportFile - Excel导入

AppMap - 地图选择点位

AppTable - 数据表格

AppPagination - 分页组件

AppInfoBuilder - 信息展示

AppVideo - 视频播放器

AppAliPlayer - 视频播放器

AppPreviewImg - 查看页面图片预览

AppPreviewPdf - 查看页面PDF预览

AppPdf - PDF预览

AppTooltipImg - 表格列中预览图片

AppTxt - 预览txt文件

AppQrCode - 二维码生成

AppSign - 电子签名

AppVerification - 滑块验证码

AppVerificationCode - 数字验证码

AppViewTree - 左侧树形菜单

AppCascader - 级联选择

🖼️ 布局

AppLayout - 默认布局

🛠️ Hooks

useDataDictionary - 获取数据字典

useListData - 列表数据管理

useForm - 表单操作

useDownloadFile - 文件下载

useDownloadBlob - 文件下载Blob

useIsExistenceDuplicateSelection - 判断数组中是否存在重复项

useQueryCriteria - 查询条件缓存

useRequestLoading - 请求加载状态

useUploadFile - 上传附件

🔨 工具函数

serialNumber(pagination, index) - 计算表格序号

numFormat(num) - 千位分隔符格式化

randoms(min, max) - 生成指定范围随机数

secondConversion(second) - 秒转时分秒

calculateFileSize(size) - 计算文件大小

ArrayDeduplication(arr) - 数组去重

arrayObjectDeduplication(arr, name) - 数组对象去重

toArrayString(value) - 字符串数组转数组

paging(list, currentPage, pageSize) - 数据分页

getSelectAppointItemList(list, value, idKey) - 获取指定项数组

listTransTree(json, idStr, pidStr, childrenStr) - JSON转树形结构

getFileName(name) - 获取文件名

getFileSuffix(name) - 获取文件后缀

interceptTheSuffix(name, suffix) - 判断文件后缀

findCharIndex(str, char, num) - 查找字符位置

getUrlParam(name) - 获取URL参数

isEmpty(value) - 验证是否为空

getDataType(data) - 获取数据类型

isEmptyToWhether(value, options) - 值转换为是否显示

image2Base64(imgUrl) - 图片转base64

image2Base642(file) - 文件转base64

checkImgExists(imgUrl) - 检查图片是否可访问

readTxtDocument(filePath) - 读取文本文档

getLabelName(status, list, idKey, nameKey) - 翻译状态

idCardGetDateAndGender(idCard) - 身份证号获取信息

addingPrefixToFile(list, options) - 文件添加前缀

verifyDuplicateSelection(list, index, key, id) - 验证重复选择

getRowSpans(data, field, rowIndex) - 计算表格合并行

createGuid(len) - 生成GUID

getFileUrl() - 获取文件前缀地址

getBaseUrl() - 获取基础URL

getWebUrl() - 获取当前页面URL

🎯 正则表达式

PHONE - 匹配中国手机号码,可包含国家代码86,支持各种运营商号段。

UNIFIED_SOCIAL_CREDIT_CODE - 匹配中国大陆的统一社会信用代码。

ID_NUMBER - 匹配中国大陆的身份证号码,包括15位和18位号码,并验证最后一位校验码。

MOBILE_PHONE - 匹配中国大陆的移动电话号码,不包含国家代码。

FLOATING_POINT_NUMBER - 匹配浮点数,允许整数、一位或两位小数,以及零的情况。

ONE_DECIMAL_PLACES - 两位小数。

TWO_DECIMAL_PLACES - 一位小数(非必须)。

LICENSE_PLATE_NUMBER - 匹配中国大陆的车牌号码。

STRONG_PASSWORD - 匹配强密码,要求至少8个字符,包含大小写字母、数字和特殊字符。

HTML_TAG - 匹配完整的HTML标签,包括开始标签和结束标签。

🗃️ 状态管理

useQueryCriteriaStore - 查询条件缓存

getQueryCriteria - 获取缓存的查询条件

setQueryCriteria - 设置缓存的查询条件

resetQueryCriteria - 清空缓存的查询条件

getTabsActiveName - 获取当前激活的 tabs 名称

setTabsActiveName - 设置当前激活的 tabs 名称

🎛️ 指令

v-permission - 权限指令

🔄 动态路由

configureDynamicRouter - 配置动态路由

resetDynamicRouter - 重置动态路由

getStorageRouter - 获取存储的动态路由

🔐 AES加密服务

configureAesSecret - 配置AES加密服务

aesEncrypt - 加密

aesDecrypt - 解密

🌐 Axios

configureAxios - 配置Axios

postRequest - post请求

getRequest - get请求

putRequest - put请求

deleteRequest - delete请求

patchRequest - patch请求

uploadRequest - upload请求

📋 枚举

formItemTypeEnum - 表单类型枚举

📄 更新日志

v1.0.0 (2025-09-22)

  • 🎉 初始版本发布

v1.1.0 (2025-09-29)

  • 🚀 稳定版本发布