1.5.9 • Published 12 months ago

vel-ui v1.5.9

Weekly downloads
-
License
ISC
Repository
-
Last release
12 months ago

基于element-ui 的二次封装,使开发更加的便捷和简单


更多详情看element-ui官方文档


安装和使用

安装

npm i vel-ui --save
(安装包内包含Element-ui无需重复安装)
使用

import ElementUI from 'element-ui'
import VelUI from 'vel-ui'
import 'element-ui/lib/theme-chalk/index.css'
import 'vel-ui/app.css'
Vue.use(ElementUI)
Vue.use(VelUI)

组件

图标组件

<VelIcon />
参数说明类型可选值默认值
iconName图标类名string------
iconText模板内部文字string------
type图标类型stringprimary / info / success / wraning / danger---

按钮组件

<VelBtn />

event
@btnClick 按钮点击事件
参数说明类型可选值默认值
size尺寸stringmedium / small / mini---
type按钮类型primary / success / warning / danger / info / text---primary
icon图标类名string------
isPlain是否朴素按钮boolean---false
isRound是否圆角按钮boolean---false
isCircle是否圆形按钮boolean---false
loading是否加载中状态boolean---false
isDisable是否朴素按钮boolean---false
isAutofocus是否默认聚焦boolean---false
nativeType原生 type 属性stringbutton / submit / resetbutton
btnText模板内部文字string---button

文字连接组件

<VelLink />
参数说明类型可选值默认值
type类型stringprimary / success / warning / danger / infoprimary
isUnderline是否下划线boolean---true
isDisable是否禁用状态boolean---false
href原生 href 属性string------
icon图标类名string------
target模板内部文字string_blak / _parent / _top / _self_blak
linkText模板内部文字string---link

单选组件

<VelRadio />

event
@radioChange(val)

slot
#defalut 参数 slot-scope="{text}"

radioList
普通类型参数
label 值 string
text 名字 string
disabled 是否禁用 boolean 
border 是否带边框 boolean 
按钮类型
label 值 string
text 名字 string
disabled 是否禁用 boolean 
btn 是否为按钮类型 boolean
参数说明类型可选值默认值
sizeRadio 的尺寸,仅在 border 为真时有效stringmedium / small / mini---
isDisable是否禁用状态boolean---false
textColor按钮形式的 Radio 激活时的文本颜色string---#ffffff
fill按钮形式的 Radio 激活时的填充色和边框色string---#409EFF
radioList配置列表string[]------
initValue默认值string,number,boolean------

表格组件

<VelTable />

event
@selectChange(select)
@headerClick(property) 点击表头方法
@actionFn(type,row) 操作方法
@actionDelFn(type) 删除操作方法

slot
#search 搜索插槽
#footer 页脚插槽
#expand 参数 slot-scoped="{row}"

columns
hander 多表头 {label,columns:[{hander:{label,columns:[{prop,label}]}} , {prop,label}]} label表头名columns 表头中的列配置
支持递归多级表头
prop 列配置字段 string
label 列配置名称 string
width 列配置宽度 string / number
hidden 列配置是否隐藏 boolean
isCompile 列配置编译方法 function(val)
align 列配置对其方式 string left / center / right 
slot 列配置插槽 boolean 参数 slot-scoped="{row}"
sortable 列表排序 boolean 
fixed 列配置固定方式 string left / right 
isTips:{effect:""} 是否提示 effect 提示颜色
action:{edit: true,del:true,more:true} eidt 隐藏编辑 /boolean del 隐藏删除 /boolean more 隐藏更多 /boolean 默认都显示
列配置中只有hander为多表头,列配置没有prop为操作
参数说明类型可选值默认值
tableData显示的数据Array------
indexMethod表格索引方法Function------
rowkey行数据的 Key,用来优化 Table 的渲染;在使用 reserve-selection 功能与显示树形数据时,该属性是必填的。类型为 String 时,支持多层访问:user.info.id,但不支持 user.info0.id,此种情况请使用 Function。string,function---id
load加载子节点数据的函数,lazy 为 true 时生效,函数第二个参数包含了节点的层级信息function------
treeProps渲染嵌套数据的配置选项object---{children: 'children', hasChildren: 'hasChildren'}
heightTable 的高度,默认为自动高度。如果 height 为 number 类型,单位 px;如果 height 为 string 类型,则这个高度会设置为 Table 的 style.height 的值,Table 的高度会受控于外部样式string,number------
maxHeightTable 的最大高度。合法的值为数字或者单位为 px 的高度。string,number---400
columnsTable配置列表string[]-----
specialWidth展开和序号列宽度string,number---50
isBorder是否带有纵向边框boolean---true
isStripe是否为斑马纹 tableboolean---true
isSelection展开和序号列宽度boolean---true
isShowSummary是否在表尾显示合计行boolean---false
isHighlightCurrentRow是否要高亮当前行boolean---true
isExpand是否可展开boolean---false
isIndex是否带索引boolean---false
isLazy是否懒加载子节点数据boolean---false

提示信息组件

<VelTips />

slot
#content 内容插槽
参数说明类型可选值默认值
effect默认提供的主题stringdark / lightlight
content显示的内容,也可以通过 slot#content 传入 DOMstring------
placementTooltip 的出现位置stringtop/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-endtop

气泡框组件

<VelPopover />

event
@hide 取消/隐藏 事件
@show 确认/显示 事件

slot
#reference 触发 Popover 显示的 HTML 元素
#default 当isPopover时 气泡框中的内容
参数说明类型可选值默认值
confirmText确认按钮文字 / 非isPopover时有效string---确定
cancelText取消按钮文字 / 非isPopover时有效string---取消
iconIcon类名 / 非isPopover时有效string---el-icon-delete
iconColorIcon颜色 / 非isPopover时有效string---red
title标题string---确定删除此条数据吗?
placement出现位置 / isPopover时有效stringtop/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-endtop
width宽度 / isPopover时有效string,number---400
trigger触发方式 / isPopover时有效stringclick/focus/hover/manualclick
isHideIcon是否隐藏 Icon / 非isPopover时有效boolean---false
isPopover是否为弹出框boolan---false

标签组件

<VelTag />

event
@close(tag) 标签关闭事件

slot
#default
参数说明类型可选值默认值
tagText标签文字string, number, function------
type标签类型stringsuccess/info/warning/danger---
color背景色string------
size尺寸stringmedium / small / mini---
isClosable是否可关闭boolean---false
isHit是否带边框boolean---false
effect主题stringdark / light / plainlight

分割线组件

<VelLine />

slot
#default
参数说明类型可选值默认值
direction设置分割线方向stringhorizontal / verticalhorizontal
cntPosition设置分割线文案的位置stringleft / right / centercenter
icon图标string------
lineText分割线文字string------

弹框组件

<VelModal />

event
@actionFn(type) 底部按钮操作方法
@close() 关闭的回调
@closed() 关闭动画结束时的回调
@open() 打开的回调
@opened() 打开动画结束时的回调

slot
#title 标题插槽
#footer 操作插槽
#default 当isDrawer时默认内容插槽
参数说明类型可选值默认值
mdlVisible是否显示 Dialog,支持 .sync 修饰符boolean---false
width弹框宽度string,number---50% dlg / 30% drawer
modalClassDialog 的自定义类名string---
topDialog CSS 中的 margin-top 值 / 非isDrawer时有效string---15vh
directionDrawer 打开的方向/ isDrawer时有效stringrtl / ltr / ttb / bttrtl
beforeCloseFn关闭前的回调function(done),done 用于关闭 modal------
isFullscreen是否为全屏 Dialog / 非isDrawer时有效boolean---false
isModal是否需要遮罩层boolean---true
isModalInBoday遮罩层是否插入至 body 元素上,若为 false,则遮罩层会插入至modal的父元素上boolean---true
isAppendBodymodal 自身是否插入至 body 元素上。嵌套的 modal 必须指定该属性并赋值为 trueboolean---false
isLockSroll是否在modal出现时将 body 滚动锁定 / 非isDrawer时有效boolean---true
isCloseEscModal是否可以通过按下 ESC 关闭 modalboolean---true
isShowClose是否显示关闭按钮boolean---true
isCenter是否对头部和底部采用居中布局 / 非isDrawer时有效boolean---false
isDestroyClose关闭时销毁 modal 中的元素boolean---false
isCloseClickModal是否可以通过点击 modal背景 关闭boolean---true
isWithHeader控制是否显示 header 栏, 默认为 true, 当此项为 false 时, title attribute 和 title slot 均不生效 / isDrawer时有效boolean---true
isDrawer是否为抽屉boolean---false
titleIcon标题图标类名 / 非isDrawer时有效string---el-icon-info
iconType标题图标类型 / 非isDrawer时有效stringprimary/info/warning/danger/successprimary
titlemodal的标题,也可通过具名 slot传入string---弹框
showAction是否显示操作string / 非isDrawer时有效---'cancel','confirm'
actionList操作列表string / 非isDrawer时有效---{key:'cancel',text:'取消'},{key:'confirm',text:'确定'},

时间线组件

<VelTimeLine />

timeLineList
time 时间 string 
text 文字描述 string 
type 节点类型 string primary / success / warning / danger / info
icon 节点图标 string 
color 节点颜色 string
size 节点尺寸 normal / large
slot 节点插槽 string   slot-scope="{row}"           
参数说明类型可选值默认值
isReverse指定节点排序方向,默认为正序boolean---false
isHideTime是否隐藏时间戳boolean---center
placement时间戳位置stringtop / bottombottom
timeLineList时间线配置列表string ------

折叠面板组件

<VelCollapse />

event
@change(val)

slot
#title 面板标题插槽
#default 面板内容插槽和name关联 slot="name"

collList 
title 面板标题 string
name 唯一标志符 string
disabled 是否禁用 boolean
参数说明类型可选值默认值
initValue当前激活的面板默认值string,array------
collList折叠面板配置列表string ------
isAccordion是否手风琴模式boolean---true

卡片组件

<VelCard />

event
@actionFn(type) 操作方法 isAction时有效

slot
#default 内容插槽
#header 头部插槽 isHeader时有效

actionList 
icon 图标类明 string
key 唯一标志符 string
type 图标类型  string   
参数说明类型可选值默认值
bodyStyle设置 body 的样式object---{ padding: '20px' }
shadow设置阴影显示时机stringalways / hover / neveralways
isHeader是否标题模式boolean---false
isAction是否操作模式boolean---false
isInlineBlock是否行内块模式boolean---false
isClearBodyStyle是否清空bodyStyle默认样式boolean---false
headerTitle头部左边标题string------
icon头部右边操作按钮图标string------
headerText头部右边操作按钮文字string------
type头部右边操作按钮类型stringtext/primay/success/danger/info/warning---
actionListisAction时操作按钮配置列表string ------

步骤条组件

<VelSteps />

stepList
title 标题 string
des 描述性文字 string	
icon 图标 string	
status 设置当前步骤的状态,不设置则根据 steps 确定状态 string wait / process / finish / error / success
参数说明类型可选值默认值
initValue默认值number---0
space每个 step 的间距,不填写将自适应间距。支持百分比。number,string------
direction显示方向stringvertical/horizontalvertical
finishStatus设置结束步骤的状态stringwait / process / finish / error / successfinish
procesSstatus设置当前步骤的状态stringwait / process / finish / error / successprocess
isCenter进行居中对齐boolean---false
isSimple是否应用简洁风格boolean---false
stepList步骤条配置列表string ------

下拉菜单组件

<VelDropDown />

event
@command(val) 点击菜单项触发的事件回调	dropdown-item 的指令
@leftFn() 左边按钮点击事件

slot
#default 

dropdownList
disabled 是否禁用 boolean
divided 显示分割线	boolean
command 指令 string/number/object
slot 插槽 string slot-scope="{row}"
icon 图标类名 string 非插槽时有效
text 显示文字 string 非插槽时有效
参数说明类型可选值默认值
type菜单按钮类型,同 Button 组件 / isSplitBtn时有效string------
trigger触发下拉的行为stringhover, clickhover
size菜单尺寸 / isSplitBtn时有效stringmedium / small / mini---
placement菜单弹出位置stringtop/top-start/top-end/bottom/bottom-start/bottom-endbottom-end
tabindexDropdown 组件的 tabindexnumber---0
text非isSplitBtn时的文字描述string---更多
isHideClick是否在点击菜单项后隐藏菜单boolean---true
isSplitBtn下拉触发元素呈现为按钮组boolean---false

页头组件

<VelPageHeader />
参数说明类型可选值默认值
type页头图标类型stringinfo/warning/success/danger/primary---
headerIcon页头图标string---el-icon-d-arrow-left
headerText页头文字string---详情页面

面包屑组件

<VelBreadcrumb />

breadcrumbList
path 跳转路径 string/object
text 文字描述 string
replace 在使用 to 进行路由跳转时,启用 replace 将不会向 history 添加新记录 boolean
参数说明类型可选值默认值
separator分隔符string---/
separatorIcon图标分隔符 classstring------
breadcrumbList面包屑配置列表string ------

标签页组件

<VelTabs />

event
@tabClick(val) tab 被选中时触发	 被选中的标签 tab 实例

slot
#label 选项卡标题插槽	
#slot  tabs每一项插槽和name关联 slot="name"

tabList
label 选项卡标题 string
name 与选项卡绑定值 value 对应的标识符,表示选项卡别名 string
disabled 是否禁用 boolean
lazy 标签是否延迟渲染 boolean
closable 标签是否可关闭 boolean
***
isBadge时有效
value 标志的值 string, number
max 最大值,超过最大值会显示 '{max}+',要求 value 是 Number 类型 number
isDot 小圆点 boolean
type 类型 string	primary / success / warning / danger / info
icon 选项卡标题图标 string
isBadge 是否开启标志模式 boolean
参数说明类型可选值默认值
initValue默认值string------
type格类型stringcard/border-card---
isBadge全局是否开启标志模式boolean---false
tabPosition项卡所在位置stringtop/right/bottom/lefttop

警告组件

<VelAlert />

event
@close(e) 关闭alert时触发的事件
参数说明类型可选值默认值
type主题stringsuccess/warning/info/errorinfo
effect选择提供的主题stringlight/darklight
closeText关闭按钮自定义文本string------
isIcon是否带图标boolan---false
isCenter是否居中boolan---false
isClosable是否可关闭boolan---false
des文字描述string------
title标题string---警告组件

描述列表组件

<VelDes />

slot
#extra 头部操作插槽
#label 自定义标签文本
#slot 自定义标签文本值与slot相关 slot="slot" slot-scope="{cnt}"

desList
label	标签文本	string
labelClassName	自定义标签类名	string	
contentClassName	自定义内容类名	string
labelStyle	自定义标签样式	object
contentStyle	自定义内容样式	object
***
未使用label slot插槽时有效
icon  标签文本图标 string
cnt 标签文本值 string
参数说明类型可选值默认值
column一行 Descriptions Item 的数量number---3
size列表的尺寸stringmedium / small / mini---
title标题文本,显示在左上方string------
extra操作区文本,显示在右上方string------
direction排列的方向stringvertical / horizontalhorizontal
isColon是否显示冒号boolan---true
isBorder是否带有边框boolean---false
labelClassName自定义标签类名string------
cntClassName自定义内容类名string------
labelStyle自定义标签样式object------
contentStyle自定义内容样式object------

骨架屏组件

<VelSkeleton />

slot
#template 需要渲染的loading状态插槽
#default 真实元素模板插槽
参数说明类型可选值默认值
rows骨架屏段落数量number正整数4
count渲染多少个 template, 建议使用尽可能小的数字numberinteger1
isLoading是否显示 skeleton 骨架屏boolean---false
throttle延迟占位 DOM 渲染的时间, 单位是毫秒number正整数0
className骨架类名 / 样式需要加!importantstring,array------

骨架item组件

<VelSkeletonItem />
参数说明类型可选值默认值
isP占位元素为p样式boolean---false
isH1占位元素为h1样式boolean---false
isH3占位元素为h3样式boolean---false
isCaption占位元素为caption样式boolean---false
isButton占位元素为button样式boolean---false
isImage占位元素为image样式boolean---false
isCircle占位元素为circle样式boolean---false
isRect占位元素为rect样式boolean---false
className骨架item类名/样式需要加!importantstring,array------

头像组件

<VelAvatar />

event
@error(e) 图片类头像加载失败的回调, 返回 false 会关闭组件默认的 fallback 行为

slot
#default 自定义头像展示内容
参数说明类型可选值默认值
size设置头像的大小number,stringnumber / large / medium / smalllarge
icon设置头像的图标类型,参考 Icon 组件string------
shape设置头像的形状stringcircle / squarecircle
src图片头像的资源地址string------
srcSet以逗号分隔的一个或多个字符串列表表明一系列用户代理使用的可能的图像string------
alt描述图像的替换文本string------
fit当展示类型为图片的时候,设置图片如何适应容器框stringfill / contain / cover / none / scale-downcover

标记组件

<VelBadge />

slot
#default 
参数说明类型可选值默认值
value显示值number,string---0
max最大值,超过最大值会显示 '{max}+',要求 value 是 number 类型number------
isDot小圆点boolean---false
type类型stringprimary / success / warning / danger / info---
isInline是否行内展示boolean---false

分页组件

<VelPagination />

event
@paginationFn(type,val) 条数改变和页面改变方法
参数说明类型可选值默认值
size每页显示条目个数number]---20
pageSizes每页显示个数选择器的选项设置array---20,50,100,200
page页数number---1
layout组件布局,子组件名用逗号分隔string'total, sizes, prev, pager, next, jumper''total, sizes, prev, pager, next, jumper'
pagerCount页码按钮的数量,当总页数超过该值时会折叠number大于等于 5 且小于等于 21 的奇数7
pageCount总页数,total 和 page-count 设置任意一个就可以达到显示页码的功能;如果要支持 page-sizes 的更改,则需要使用 total 属性number------
prevText替代图标显示的上一页文字string------
nextText替代图标显示的下一页文字string------
isDisable是否禁用boolean---false
isHide只有一页时是否隐藏boolean---false
isBackground是否带背景颜色boolean---true
isSmall是否使用小型分页样式boolean---false

树形组件

<VelTree />

event
@nodeClick(data) 节点被点击时的回调 共三个参数,依次为:传递给 data 属性的数组中该节点所对应的对象、节点对应的 Node、节点组件本身。
@dragStart(node,e) 节点开始拖拽时触发的事件 共两个参数,依次为:被拖拽节点对应的 Node、event
@dragEnter(node,allnode,e) 拖拽进入其他节点时触发的事件 共三个参数,依次为:被拖拽节点对应的 Node、所进入节点对应的 Node、event
@dragLeave(node,allnode,e) 拖拽离开某个节点时触发的事件  共三个参数,依次为:被拖拽节点对应的 Node、所离开节点对应的 Node、event
@dragOver(node,allnode,e) 在拖拽节点时触发的事件(类似浏览器的 mouseover 事件) 共三个参数,依次为:被拖拽节点对应的 Node、当前进入节点对应的 Node、event
@dragEnd(node,allnode,f,e) 拖拽结束时(可能未成功)触发的事件  共四个参数,依次为:被拖拽节点对应的 Node、结束拖拽时最后进入的节点(可能为空)、被拖拽节点的放置位置(before、after、inner)、event
@drop(a,b,c,d) 拖拽成功完成时触发的事件  共四个参数,依次为:被拖拽节点对应的 Node、结束拖拽时最后进入的节点、被拖拽节点的放置位置(before、after、inner)、event
@checkChange(a,b,c) 当前选中节点变化时触发的事件 共两个参数,依次为:当前节点的数据,当前节点的 Node 对象
@check(a,b) 当复选框被点击的时候触发 共两个参数,依次为:传递给 data 属性的数组中该节点所对应的对象、树目前的选中状态对象,包含 checkedNodes、checkedKeys、halfCheckedNodes、halfCheckedKeys 四个属性

slot
#default 默认插槽 slot-scope="{item}"

props
label	指定节点标签为节点对象的某个属性值	string, function(data, node)
children	指定子树为节点对象的某个属性值	string
disabled	指定节点选择框是否禁用为节点对象的某个属性值	boolean, function(data, node)
isLeaf	指定节点是否为叶子节点,仅在指定了 lazy 属性的情况下生效	boolean, function(data, node)
参数说明类型可选值默认值
expandedKeys默认展开的节点的 key 的数组array------
checkedKeys默认勾选的节点的 key 的数组array------
renderFn树节点的内容区的渲染 FunctionFunction(h, { node, data, store }------
filterFn对树节点进行筛选时执行的方法,返回 true 表示这个节点可以显示,返回 false 则表示这个节点会被隐藏Function(value, data, node)------
allowDrop拖拽时判定目标节点能否被放置。type 参数有三种情况:'prev'、'inner' 和 'next',分别表示放置在目标节点前、插入至目标节点和放置在目标节点后Function(draggingNode, dropNode, type)------
allowDrag判断节点能否被拖拽Function(node)------
indent相邻级节点间的水平缩进,单位为像素number---16
iconClass自定义树节点的图标string------
isShowCheckBox节点是否可被选择boolean---false
isLazy是否懒加载子节点,需与 load 方法结合使用boolean---false
isExpandAll是否默认展开所有节点boolean---false
isHighlightCurrent是否高亮当前选中节点boolean---false
isAccordion是否每次只打开一个同级树节点展开boolean---false
isDraggable是否开启拖拽节点功能boolean---false
isRednerAfterExpand是否在第一次展开某个树节点后才渲染其子节点boolean---true
isExpandClickNode是否在点击节点的时候展开或者收缩节点, 默认值为 true,如果为 false,则只有点箭头图标的时候才会展开或者收缩节点。boolean---true
isCheckClickNode是否在点击节点的时候选中节点,默认值为 false,即只有在点击复选框时才会选中节点。boolean---false
isAutoExpandParent展开子节点的时候是否自动展开父节点boolean---true
isCheckStrictly在显示复选框的情况下,是否严格的遵循父子不互相关联的做法,默认为 falseboolean---false
props节点属性object---{ children: 'children', label: 'label' }
nodeKey每个树节点用来作为唯一标识的属性,整棵树应该是唯一的string---id
treeList展示数据string ------

进度条组件

<VelProgress />
参数说明类型可选值默认值
status进度条当前状态stringsuccess/exception/warning---
format指定进度条文字内容function(percentage)------
height进度条的宽度,单位 pxnumber---6-
isInset进度条显示文字内置在进度条内(只在 type=line 时可用)boolean---false
color进度条背景色(会覆盖 status 状态颜色)string/function/array---''
type进度条类型line/circle/dashboard---line
isText是否显示进度条文字内容boolean---true
bothShapecircle/dashboard 类型路径两端的形状stringbutt/round/squareround
percentage百分比(必填)number0-1000

穿梭框组件

<VelTransfer />

event
@change(val,direction,keyarr) 右侧列表元素变化时触发  当前值、数据移动的方向('left' / 'right')、发生移动的数据 key 数组

slot
#default 默认内容插槽  slot-scope="{ option }"
#lfooter 左边底部插槽
#rfooter 右边底部插槽
参数说明类型可选值默认值
initValue默认值Array------
placeholder搜索框占位符string---请输入搜索内容
leftChecked初始状态下左侧列表的已勾选项的 key 数组array---
rightChecked初始状态下右侧列表的已勾选项的 key 数组array---
titles自定义列表标题array---'列表 1', '列表 2'
btnTexts自定义按钮文案array---
format列表顶部勾选状态文案object{noChecked, hasChecked}---{ noChecked: '${checked}/${total}', hasChecked: '${checked}/${total}' }
props数据源的字段别名object{key, label, disabled}------
targetOrder右侧列表元素的排序策略:若为 original,则保持与数据源相同的顺序;若为 push,则新加入的元素排在最后;若为 unshift,则新加入的元素排在最前stringoriginal / push / unshiftoriginal
renderFn自定义数据项渲染函数function(h, option)------
filterFn自定义搜索方法function------
isFilter是否可搜索boolean---false
transferList穿梭框配置列表string ------

时间日期组件组件

<VelDateTime />

event
@focus()
@change(val)
@blur()
参数说明类型可选值默认值
initValue默认值string,date,array------
DateTimeOptions时间日期默认配置Object---动态改变
isCtrl是否使用箭头进行时间选择/ isTimePicker 时有效booleanfalse
placeholder非范围选择时的占位内容string------
rangeText选择范围时的分隔符string----
startText范围选择时开始日期的占位内容string---开始时间
endText范围选择时结束日期的占位内容string---结束时间
isClearable是否可清空boolean---true
size输入框尺寸stringmedium / small / mini---
align对齐方式stringleft / center / rightleft
valueFormat可选,仅TimePicker时可用,绑定值的格式。不指定则绑定值为 Date 对象string---yyyy-MM-dd
beforeIcon自定义头部图标的类名string---动态改变
clearIcon自定义清空图标的类名string---el-icon-circle-close
defaultTime范围选择时选中日期所使用的当日内具体时刻/isDate时有效string[]数组,长度为 2,每项值为字符串,形如12:00:00,第一项指定开始日期的时刻,第二项指定结束日期的时刻,不指定会使用时刻 00:00:00---
format显示在输入框中的格式 / 默认和isDate时有效见element 详情---yyyy-MM-dd
defaultValue可选,选择器打开时默认显示的时间date可被new Date()解析---
selectableRange可选时间段,例如'18:30:00 - 20:30:00'或者传入数组'09:30:00 - 12:00:00', '14:30:00 - 18:30:00'string / array------
isWeek是否为周组件 / isDate 时有效boolean---false
isMonth是否为月组件 / isDate 时有效boolean---false
isYear是否为年组件 / isDate 时有效boolean---false
isDates是否为多个日期组件 / isDate 时有效boolean---false
isDaterange是否为日期范围组件 / isDate 时有效boolean---false
isMonthrange是否为月份范围组件/ isDate 时有效boolean---false
isDate是否为日期组件boolean---false
isTimePicker否为时间范围组件boolean---false
isDateTime否为日期时间组件/ isDate 时有效boolean---false
isDatetimeRange否为日期时间范围组件/ isDate 时有效boolean---false
isReadonly完全只读boolean---false
isDisable禁用boolean---false
isUnlinkPanels在范围选择器里取消两个日期面板之间的联动 / isDate时有效boolean---false

滑块组件

<VelSlider />

event
@change(val)
@input(val)
参数说明类型可选值默认值
initValue默认值number------
formatTip格式化 tooltip messagefunction(value)------
step步长number---1
max最大值number---100
min最小值number0
inputSize输入框的尺寸stringlarge / medium / small / minismall
heightSlider 高度,竖向模式时必填string-----
label屏幕阅读器标签Slider-----
debounce输入时的去抖延迟,毫秒,仅在show-input等于true时有效number---300
tipClasstooltip 的自定义类名string------
marks标记, key 的类型必须为 number 且取值在闭区间 min, max 内,每个标记可以单独设置样式object------
isTip是否显示 tooltipboolean---false
isDisable禁用boolean---false
isVertical是否竖向模式boolean---false
isRange是否为范围选择boolean---false
isStops是否显示间断点boolean---false
isInput是否显示输入框,仅在非范围选择时有效boolean---false
isInputCtrl在显示输入框的情况下,是否显示输入框的控制按钮boolean---false

开关组件

<VelSwitch />

event
@change(val)
参数说明类型可选值默认值
initValue默认值Boolean,String,Number---false
activeColorswitch 打开时的背景色string---#409EFF
inactiveColorswitch 关闭时的背景色string---#C0CCDA
activeTextswitch 打开时的文字描述string------
inactiveTextswitch 关闭时的文字描述string------
activeValueswitch 打开时的值Boolean,String,Number---true
inactiveValueswitch 关闭时的值Boolean,String,Number---false
widthswitch 的宽度(像素)number---40
activeIconClassswitch 打开时所显示图标的类名,设置此项会忽略 active-textstring------
inactiveIconClassswitch 关闭时所显示图标的类名,设置此项会忽略 inactive-textstring------
nameswitch 对应的 name 属性string------
isValidate改变 switch 状态时是否触发表单的校验boolean---true
isDisable禁用boolean---false

级联选择器组件

<VelCascader />

event
@change(val) 当选中节点变化时触发
@expandChange(val) 当展开节点发生变化时触发
***
非折叠面板有效
@focus()
@blur()
@removeTag(tag) 在多选模式下,移除Tag时触发

slot
#default 默认内容插槽 slot-scope="{item}"

折叠面板只有效的参数
initValue
props
cascaderList
参数说明类型可选值默认值
initValue默认值---------
isDisable禁用boolean---false
props配置选项 详情看elementObject-----
isOnlyLast输入框中是否显示选中值的完整路径boolean---false
isCollapseTags多选模式下是否折叠Tagboolean---false
isFilter是否可搜索选项boolean---false
size尺寸stringmedium / small / mini---
filterFn自定义搜索逻辑,第一个参数是节点node,第二个参数是搜索关键词keyword,通过返回布尔值表示是否命中function(node, keyword)------
placeholder输入框占位文本string---请选择
separator选项分隔符string---/
debounce搜索关键词输入的去抖延迟,毫秒number---300
popperClass自定义浮层类名string------
berforeFilterFn筛选之前的钩子,参数为输入的值,若返回 false 或者返回 Promise 且被 reject,则停止筛选function(val)------
isClearable是否可清空boolean---true
isPanel是否为级联面板boolean---false
cascaderList级联选择器数据string ------

计数器组件

<VelInputNum />

event
@focus()
@change(val)
@blur()
参数说明类型可选值默认值
initValue默认值number---0
min设置计数器允许的最小值number----Infinity
max设置计数器允许的最大值number---Infinity
label输入框关联的label文字string------
step计数器步长number---1
size计数器尺寸stringlarge, small---
ctrlPosition控制按钮位置stringright---
name原生属性string------
placeholder输入框默认 placeholderstring------
isDisable禁用boolean---false
isStepStrictly是否只能输入 step 的倍数boolean---false
isCtrl是否使用控制按钮boolean---true

多选组件

<VelCheckbox />

event
@change(val)

slot
#default slot-scope="{item}"

checkboxList
普通类型
size Checkbox 的尺寸,仅在 border 为真时有效 string	medium / small / mini
border 是否显示边框 boolean
label 选中状态的值 string
disabled 是否禁用 boolean
checked 当前是否勾选 boolean
按钮类型可选
label
disabled
checked
btn 是否为按钮类型 boolean
参数说明类型可选值默认值
initValue默认值array------
min可被勾选的 checkbox 的最小数量number------
max可被勾选的 checkbox 的最大数量number------
isDisable全局禁用boolean---false
textColor按钮形式的 Checkbox 激活时的文本颜色string---#ffff
fill按钮形式的 Checkbox 激活时的填充色和边框色string---#409EFF
checkboxList多选组件配置列表string[]------

输入框组件

<VelInput />

event
focus()
change(val)
blur()
input(val)
clear() 在点击由 clearable 属性生成的清空按钮时触发
select(item) 选中 input 中的文字
querySearch(queryString, cb)

slot
#beforeIcon  前置图标插槽 使用时需加上 el-icon__input 类名
#afterIcon 后置图标插槽 使用时需加上 el-icon__input 类名
#beforeText 前置文字插槽 
#afterText 后前置文字插槽 
#default 自定义模板插槽 slot-scope="{item}" / isShowAutocomplete时有效
参数说明类型可选值默认值
initValue默认值string------
placeholder文字提示string------
beforeIcon输入框头部图标string------
afterIcon输入框尾部图标string------
type类型stringtext,textarea 和其他 原生 input 的 type 值text
rows输入框行数,只对 type="textarea" 有效number---2
autosize自适应内容高度,只对 type="textarea" 有效,可传入对象,如,{ minRows: 2, maxRows: 6 }Object,boolean---false
size输入框尺寸,只在 type!="textarea" 时有效string---medium / small / mini
popperClassAutocomplete 下拉列表的类名 / isShowAutocomplete时有效string------
maxlength原生属性,最大输入长度number------
minlength原生属性,最小输入长度number------
autocomplete原生属性,自动补全stringon/offon
name原生属性string------
max原生属性,设置最大值number------
min原生属性,设置最小值number------
step原生属性,设置输入字段的合法数字间隔number------
resize控制是否能被用户缩放stringnone, both, horizontal, vertical---
form原生属性string------
label输入框关联的label文字string------
tabindex输入框的tabindexstring------
valueKey输入建议对象中用于显示的键名 / isShowAutocomplete时有效string---value
debounce获取输入建议的去抖延时 / isShowAutocomplete时有效number---300
placement菜单弹出位置/ isShowAutocomplete时有效stringtop / top-start / top-end / bottom / bottom-start / bottom-endbottom-start
isOnfocus原生属性,自动获取焦点boolean---false
isSelectUnmatched在输入没有任何匹配建议的情况下,按下回车是否触发 select 事件boolean/ isShowAutocomplete时有效---false
isHadeLoading是否隐藏远程加载时的加载图标 / isShowAutocomplete时有效boolean---false
isHighlightFirstItem是否默认突出显示远程搜索建议中的第一项/ isShowAutocomplete时有效boolean---false
isShowAutocomplete是否为自动补全组件boolean---false
isDisable禁用boolean---false
isClearable是否有清空按钮boolean---true
isPassword是否为密码框boolean---false
isReadonly只读boolean---false
isAutofocus是否自动聚焦boolean---false
isLimit是否显示输入字数统计,只在 type = "text" 或 type = "textarea" 时有效boolean---false

下拉框组件

<VelSelect />

event
@focus()
@clear()
@change(val)
@blur()
@remove-tag(e)

slot
#beforeIcon 前置图标插槽

selectList
label 文字描述
value 绑定值
disabled 禁用
size 大小
{label:'string',value:'string',disabled:'boolean'}
****
options时 
label 文字描述
value 绑定值
disabled 禁用
{label:'string',options:[
    {label:'string',value:'string'}
]}
参数说明类型可选值默认值
initValue初始值string,boolean,number------
placeholder下拉框文字提示string------
filterFn自定义搜索方法function-----
remoteFn远程搜索方法function-----
valueKey作为 value 唯一标识的键名,绑定值为对象类型时必填string---value
size输入框尺寸stringmedium/small/mini---
limit多选时用户最多可以选择的项目数,为 0 则不限制number---0-
autocompleteselect input 的 autocomplete 属性stringon / offoff
nameselect input 的 name 属性string------
loadingText远程加载时显示的文字string---加载中
selectList下拉框配置string[]------
isClearable是否可以清空选项boolean---true
isMultiple是否多选boolean---false
isCollapseTags多选时是否将选中值按文字的形式展示boolean---false
isFilter是否可搜索boolean---false
isReKeyword多选且可搜索时,是否在选中一个选项后保留当前的搜索关键词boolean---false
isAutodropdown对于不可搜索的 Select,是否在输入框获得焦点后自动弹出选项菜单boolean---false
isRemote是否为远程搜索boolean---false
isFirstoption在输入框按下回车,选择第一个匹配项。需配合 filterable 或 remote 使用boolean---false
isCreate是否允许用户创建新条目,需配合 filterable 使用boolean---false
isDisable是否禁用boolean---false

现有组件

    VelIcon,
    VelBtn,
    VelLink,
    VelRadio,
    VelTable,
    VelCard,
    VelCollapse,
    VelLine,
    VelPopover,
    VelTag,
    VelTips,
    VelTimeLine,
    VelSetps,
    VelDropdown,
    VelPageHeader,
    VelBreadcrumb,
    VelTabs,
    VelAlert,
    VelDes,
    VelSkeleton,
    VelSkeletonItem,
    VelAvatar,
    VelBadge,
    VelPagination,
    VelTree,
    VelProgress,
    VelTransfer,
    VelDateTime,
    VelSlider,
    VelSwitch,
    VelCascader,
    VelSelect,
    VelInputNum,
    VelInput,
    VelCheckbox,
    VelModal,
1.5.9

12 months ago

1.5.8

1 year ago

1.5.6

1 year ago

1.4.6

2 years ago

1.5.4

1 year ago

1.4.5

2 years ago

1.5.3

2 years ago

1.4.4

2 years ago

1.5.2

2 years ago

1.4.3

2 years ago

1.5.1

2 years ago

1.4.2

2 years ago

1.5.0

2 years ago

1.4.1

2 years ago

1.4.9

2 years ago

1.4.8

2 years ago

1.4.7

2 years ago

1.4.0

2 years ago

1.3.9

2 years ago

1.3.8

2 years ago

1.3.7

2 years ago

1.3.6

2 years ago

1.3.5

2 years ago

1.3.4

2 years ago

1.3.3

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.9

2 years ago

1.2.8

2 years ago

1.2.7

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.0.0

2 years ago