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 🙏

© 2024 – Pkg Stats / Ryan Hefner

h-common-ui

v1.6.5

Published

华研前端-公共组件库

Downloads

629

Readme

h-common-ui

h-common-ui 是一个前端组件 utils 的封装库。

功能

  • utils:封装了一系列常用的工具函数,如请求、响应处理等。

使用方法

  1. 安装依赖 npm i h-common-ui
  2. 在项目中引入 h-common-ui
  3. 使用组件和工具函数

更新

  • 1.6.0 新增组件 crudTable

  • 0.0.5 useList 新增返回按钮 loadlist 方法

  • 0.0.6 HandleButtons 组件抽取

CRUDTable 组件说明

Dialog 组件说明

HandleButtons 组件说明

HTag 组件说明

API

Attributes

| 字段名 | 类型 | 必填 | 默认值 | 可选值 | 描述 | | ------- | ----- | ---- | ------ | ------ | -------- | | tagList | Array | 否 | [] | ---- | 标签列表 |

ListToMore 组件说明

API

Attributes

| 字段名 | 类型 | 必填 | 默认值 | 可选值 | 描述 | | --------- | ------ | ---- | -------- | ------ | ---------------- | | list | Array | 否 | [] | ---- | 更多中的列表 | | moreByNum | Number | 否 | 5 | --- | 几个需要展示更多 | | listInKey | String | 否 | 'action' | --- | list 中的 key |

ReceiveAddress 组件说明

API

Attributes

| 字段名 | 类型 | 必填 | 默认值 | 可选值 | 描述 | | ---------- | ------- | ---- | ---------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | modelValue | String | 否 | --- | ---- | 已选回显 | | type | String | 否 | pcaTextArr | 'provinceAndCityData','regionData','pcTextArr','pcaTextArr','codeToText' | provinceAndCityData:省市二级联动数据,汉字+code; regionData:省市区三级联动数据; pcTextArr:省市联动数据,纯汉字;pcaTextArr:省市区联动数据,纯汉字;codeToText:是个大对象,属性是区域码,属性值是汉字,用法例如:codeToText['110000']输出北京市 | | useInput | Boolean | 否 | true | --- | 是否使用 input | | disabled | Boolean | 否 | false | --- | 是否禁用 |

Events

| 事件名 | 说明 | Type | | ----------------- | -------- | -------- | | update:modelValue | 已选回显 | Function | | change | 切换回调 | Function |

Table 组件说明

API

Attributes

| 字段名 | 类型 | 必填 | 默认值 | 可选值 | 描述 | | ------- | ----- | ---- | ------ | ------ | -------- | | data | Array | 是 | [] | ---- | 列表数据 | | columns | Array | 是 | [] | ---- | 列表表格 |

TableSearch 组件说明

API

Attributes

| 字段名 | 类型 | 必填 | 默认值 | 可选值 | 描述 | | ------------ | ------- | ---- | ------ | ------ | ---------------- | | isShow | Boolean | 否 | true | ---- | 是否展示更多筛选 | | searchParams | Object | 否 | {} | ---- | 搜索条件 | | rules | Object | 否 | {} | ---- | 规则 |

Upload 组件说明

API

Attributes

| 字段名 | 类型 | 必填 | 默认值 | 可选值 | 描述 | | -------------- | -------- | ---- | ------------- | ------------- | ------------------ | | url | String | 是 | --- | ---- | 上传地址 | | downloadConfig | Object | 否 | {} | ---- | 下载配置 | | accept | String | 否 | '.xlsx, .xls' | '.xlsx, .xls' | 文件类型 | | title | String | 否 | '导入' | --- | 弹窗标题 | | param | Object | 否 | {} | --- | 上传额外参数 | | beforeSubmit | Function | 否 | {} | --- | 提交前判断 | | fileLimit | Number | 否 | 10 | --- | 上传文件大小 | | successMsg | String | 否 | --- | --- | 上传成功提示 | | getToken | Function | 是 | {} | --- | 设置上传的请求头部 | | download | Function | 否 | {} | --- | 下载模板操作 |

Events

| 事件名 | 说明 | Type | | ------ | -------- | -------- | | update | 更新数据 | Function |