New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hundun-ui-component

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hundun-ui-component

hundun-ui-component

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
0
Weekly downloads
 
Created
Source

hundun-ui-component 前端组件库

仓库

当前组件库发布在 私有仓库中,仓库地址: http://10.43.219.188:4873/

// 设置仓库地址
npm config set registry http://10.43.219.188:4873

安装

npm install --save  hundun-ui-component

引用与配置

 // 导入组件库
import hundunComponent  from 'hundun-ui-component'
// 注册组件库
Vue.use(hundunComponent) 
// 配置axios
// 其中axios为当前前端项目配置好的axios封装,后续将使用当前项目的axios进行组件内部的http请求
window.http = axios 

页面引用示例

<div id="app"> 
    <hundun-dict-select v-model="value" dict-type="sex" style="width:200px"/> 
</div>

目前已经封装的组件包含:

1、 hundun-dict-select 数据字典-下拉选择

2、 hundun-dict-radio 数据字典-单选

3、 hundun-dict-checkbox 数据字典-复选

4、 hundun-dict 数据字典-回显

5、 hundun-fileupload 文件上传

6、 hundun-org-select 区划选择

7、 hundun-org-any-select 区划选择-任意一级

8、 hundun-org 区划回显

9、 hundun-icon icon图标

10、 hundun-table 数据表格

11、 hundun-user 用户回显

12、 hundun-imageupload 图片上传

13、 hundun-dialog 弹出框

14、 hundun-imageupload-cutter 图片裁切上传

hundun-dict-select

Attributes
参数说明类型可选值默认值
v-model绑定值String/Array--
dictType对应数据字典,不能为空string--
styleclass样式String-width:100%
placeholder提示placeholderString--
disabled是否禁用Booleantrue/falsefalse
multiple是否多选Booleantrue/falsefalse
clearable清空Booleantrue/falsefalse
multipleLimit多选下最多选几个Integer--
excludeValue过滤掉字典中哪些值,可以是字典label也可以是字典value,逗号分割String--
includeValue字典中只显示哪些值,可以是字典label也可以是字典value,逗号分割String--
filterable是否自带过滤StBooleanring-false

hundun-dict-radio

Attributes
参数说明类型可选值默认值
v-model绑定值string / number / boolean--
dict-type对应数据字典,不能为空string--
placeholder提示placeholderString--
disabled是否禁用booleantrue/falsefalse

hundun-dict-checkbox

Attributes
参数说明类型可选值默认值
v-model绑定值string / number / boolean--
dict-type对应数据字典,不能为空string--
placeholder提示placeholderString--
disabled是否禁用booleantrue/falsefalse

hundun-dict

Attributes
参数说明类型可选值默认值
v-model绑定值string / Array--
type字典类型string--
split-char分隔字符string-,

hundun-fileupload

Attributes
参数说明类型可选值默认值
v-model绑定值string / Array--
read-only文件只读booleantrue/falsefalse
accept允许文件上传的类型string--
show-accept是否显示支持文件类型Booleantrue/falsetrue
multiple是否支持多个文件booleantrue/falsefalse
limit图片上传数量number--
imgdown-but图片模式下下载按钮是否显示booleantrue/falsefalse
file-size文件大小(Mb)number-10
limit-auto-hidden超导最大文件数量后是否还显示上传文件按钮booleantrue/falsefalse
width图片模式下上传后图片压缩宽度number--
show-list是否展示文件列表booleantrue/falsetrue
watermark是否给上传文件添加水印number/String1-只保留水印文件 2-源文件和水印文件都要-
watermark-position水印位置stringleftTop rightTop leftBottom rightBottom-
watermark-type水印类型stringicon text-
watermark-content水印内容 类型=icon时需要提前再nacos中配好对应类型的图片string-
事件
回调方法说明参数
uploadChange图片上传后图片的详情回调{id:xxx,url:文件url,fileSize:文件大小,oldFileName:原始文件名称}

hundun-org-select

Attributes

参数说明类型可选值默认值
v-model绑定值string--
width宽度String-250px
one-by-one一个接一个选Booleantrue/falsefalse
disabled是否禁用Booleantrue/falsefalse
max-level最大显示层级Number1,2,33

hundun-org-any-select

Attributes

参数说明类型可选值默认值
v-model绑定值string--
disabled是否禁用Booleantrue/falsefalse
parent-code过滤省代码Strig(610000)
level最大层级Number1-省级 2-地市 3-区县3
check-strictly是否严格的遵守父子节点不互相关联Booleantrue
emit-path在选中节点改变时,是否返回由该节点所在的各级菜单的值所组成的数组,若设置 false,则只返回该节点的值Booleanfalse

hundun-org

参数说明类型可选值默认值
v-model绑定区划值string--
showAllPath是否显示全部路径Booleantrue/falsetrue
separator路径显示分割字符String-/

hundun-icon

Attributes
参数说明类型可选值默认值
name图标名称必填string--
class-name文件图标样式String--
width宽度Integer-24
multiple是否支持多个文件booleantrue/falsefalse
height高度Integer-24

hundun-table

Attributes
参数说明类型可选值默认值
datas显示的数据,必填array--
columns显示的表头,必填(格式参见下表)array--
max-heightTable 的最大高度。合法的值为数字或者单位为 px 的高度。string/number--
stripe是否为斑马纹 tablebooleantrue/falsefalse
border是否带有纵向边框booleantrue/falsefalse
show-summary是否在表尾显示合计行booleantrue/falsefalse
row-style行的 style 的回调方法,也可以使用一个固定的 Object 为所有行设置一样的 Style。Function({row, rowIndex})/Object--
cell-style单元格的 style 的回调方法,也可以使用一个固定的 Object 为所有单元格设置一样的 Style。Function({row, column, rowIndex, columnIndex})/Object--
dblclick双击击时会触发该事件Function--
row-style行的 style 的回调方法,也可以使用一个固定的 Object 为所有行设置一样的 Style。Function({row, rowIndex})/Object--
show-index是否显示下标booleantrue/falsefalse
show-selection是否开启选项(单选状态为单选框/多选状态为复选框)booleantrue/falsefalse
multiple是否多选booleantrue/falsefalse
page是否分页booleantrue/falsetrue
columns 的配置属性
参数说明类型可选值默认值
prop对应列内容的字段名,必填string--
label显示的标签,必填string--
width宽度number--
fix是否固定booleantrue/falsefalse

hundun-user

Attributes

参数说明类型可选值默认值
value用户IDstring--

hundun-imageupload

Attributes

参数说明类型可选值默认值
v-model绑定值string--
read-only只读booleantrue/falsefalse
accept允许文件上传的类型string--
file-size文件大小(Mb)number-10
width图片压缩后的宽度,不填则不压缩number-
watermark是否给上传文件添加水印number/String1-只保留水印文件 2-源文件和水印文件都要-
watermark-position水印位置stringleftTop rightTop leftBottom rightBottom-
watermark-type水印类型stringicon text-
watermark-content水印内容 类型=icon时需要提前再nacos中配好对应类型的图片string-
事件
回调方法说明参数
uploadChange图片上传后图片的详情回调{id:xxx,url:文件url,fileSize:文件大小,oldFileName:原始文件名称}

hundun-dialog

Attributes

参数说明类型可选值默认值
visible是否显示 Dialog,支持 .sync 修饰符booleanfalse
titleDialog 的标题,也可通过具名 slot (见下表)传入string
widthDialog 的宽度string50%
fullscreen是否为全屏 Dialogbooleanfalse
topDialog CSS 中的 margin-top 值string15vh
modal是否需要遮罩层booleantrue
modal-append-to-body遮罩层是否插入至 body 元素上,若为 false,则遮罩层会插入至 Dialog 的父元素上booleantrue
append-to-bodyDialog 自身是否插入至 body 元素上。嵌套的 Dialog 必须指定该属性并赋值为 truebooleanfalse
lock-scroll是否在 Dialog 出现时将 body 滚动锁定booleantrue
custom-classDialog 的自定义类名string — —
close-on-click-modal是否可以通过点击 modal 关闭 Dialogbooleantrue
close-on-press-escape是否可以通过按下 ESC 关闭 Dialogbooleantrue
show-close是否显示关闭按钮booleantrue
before-close关闭前的回调,会暂停 Dialog 的关闭function(done),done 用于关闭 Dialog
center是否对头部和底部采用居中布局booleanfalse
destroy-on-close关闭时销毁 Dialog 中的元素booleanfalse
drag是否可以拖拽booleantrue
插槽
名称说明
-Dialog 的内容
titleDialog 标题区的内容
footerDialog 按钮操作区的内容
事件
回调方法说明参数
openDialog 打开的回调
openedDialog 打开动画结束时的回调
closeDialog 关闭的回调
closedDialog 关闭动画结束时的回调

hundun-imageupload-cutter

配置信息

参数说明类型可选值默认值
v-model绑定值-图片地址string--
read-only只读booleantrue/falsefalse
original-graph原图裁剪booleantrue/falsefalse
move-able允许拖动裁剪框booleantrue/falsetrue
img-move允许移动图片booleantrue/falsetrue
scale-able允许缩放图片booleantrue/falsetrue
box-height裁剪组件高度number-458
cut-width选择框宽度number-250
cut-height选择框高度number-250
quality图片质量number0-11
rate宽高比string1:1/2:1/16:9-
file-type返回文件类型string-
size-change允许修改选择框尺寸true/false-true

事件

回调方法说明参数
uploadChange图片上传后图片的详情回调{id:xxx,url:文件url,fileSize:文件大小,oldFileName:原始文件名称}

Keywords

FAQs

Package last updated on 10 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc