myun-ui
v1.0.5
Published
自用elementUi组件二次封装,依赖 elementUi wangEditor
Downloads
374
Readme
myun-ui
做项目重复度太高了,经常粘粘贴贴,所以打算把经常使用的组件封装成ui库
Google找的教程对我一些常用的组件做了一下封装
下次就可以直接npm下载啦,~~撒花~~
myun-ui-search 搜索框
使用方法
对外参数:form formList labelWidth
form:传递绑定的form对象,因为是引用类型,所以组件内直接对其进行修改,不会出现报错,可以在组件外直接获取
formList:传递循环的数组,参数如下:
{
String label elementUi的label值
String value input绑定的form对应值
String style 对应行的行内样式
String type 类型 text(文本) / select(下拉选) / cascader(级联选) / dateToDate(日期选择器) / slot
slot 插槽名称
String mold type=text || dateToDate时,对应`el-input`/`el-date-picker`的type值
String placeholder elementUi的placeholder
Array children type=select || dateToDate 的 `el-option` || options
Function @change 级联会触发此事件
Object pickerOptions dateToDate对应`el-date-picker`的`picker-options`
children:[{label:'',value:''}]
}
myun-ui-form 表单(未完成)
不太完善,之后会加上日期选择器和相关内容。富文本因为组件抽出后没有测试,所以标注未完成
使用方法
对外参数:form formList edit(未完成) uploadUrl(富文本/未完成) token(富文本/未完成) labelWidth
form:同上
formList:传递循环的数组,参数如下:
{
String label elementUi的label值
String value input绑定的form对应值
Array rules 校验规则
class :class绑定的样式名
String style 对应行的行内样式
String type 类型 text(文本) / select(下拉选) / radio(没上传呢) / slot
slot 插槽名称
String mold type=text || dateToDate时,对应`el-input`/`el-date-picker`的type值
String placeholder elementUi的placeholder
Boolean readonly 只读
Array children type=select || dateToDate 的 `el-option` || options
Function @change 下拉选会触发此事件
children:[{label:'',value:''}]
}
对外事件:`validate 规则校验` `wangEditerPull 获取富文本` `wangEditerPush 设置富文本` `wangEditerDisabled 禁用富文本`
myun-ui-wang-editor 富文本(未完成)
使用方法
对外参数:uploadUrl(富文本/未完成) token(富文本/未完成)
对外事件:`getContent 获取内容` `setContent 设置内容` `disabledEdit 禁用`
myun-ui-table 表格
使用方法
对外参数:`tableData` `tableList` `tableConfig` `layout` `pageSizes` `total`
对外参数:`paginationStyle` `paginationConfig` `pageInfo`
tableData:el-table data
tableList:[{
`slot`,`value`,`label`,`width`,`minWidth`,`maxWidth`,`fixed``formatter`
}]
tableConfig{
`stripe`,`border`,`tableRowClassName`,`height`,`maxHeight`,`handleSelectionChange`
}
paginationStyle: `el-pagination` 行内样式设置处
paginationConfig:{
`show`,`small``background`
}
pageInfo:{
pageNum,pageSize
}
对外事件:`pageChange 分页参数变动`
myun-ui-line-info 行数据展示
使用方法
对外参数:`details` `lineData` `labelWidth`
details:{} 详情数据
lineData:[{
`label` `value` `style` `slot`
}]
默认每行宽50%,可以通过style对其行内样式表进行修改,以改变每行排列个数