axb-element-ui
v0.2.2
Published
axb组件库是一个基于的ElemntUI二次封装的定制化组件库
Downloads
32
Readme
tree-permission
Project setup
axb-基于elementUI-二次封装的定制化组件库
Compiles and hot-reloads for development
treePermission 组件
<treePermission :tree-list="data" v-model = "selectedItems"/>
data为一个树状结构,数据结构包含 id name parentId children buttons constraints是否置灰不可选
data:[
{
id:'',
name:'',
buttons:[],
parentId:0
children:[
{
id:'',
name:'',
button:[],
parentId:''
children:[
......
]
}
]
}
]
selectedItems为已选择的菜单ID
needCheckedAll:是否需要全选
isView:disabled是否置灰
unChangeSelected 默认选择的 点击全部 不会取消的
forbidData 禁止选中得数据
scrollSellect组件
<ScrollSelect
:selected-value="form.accountId"
:get-list-methods="getListMethods"
:go-loading.sync="loadingFlag.accountLoading"
:get-list-format="getListFormat"
:get-list-params="form"
:clearable="currentComponent !== 'LiberalProfessionsFlowing'?true:false"
placeholder-text="请输入自由职业者姓名"
search-key="accountName"
size="50"
@selectedChange="selectedChange"
@total="getTotal"
/>
selected-value 选中的值
get-list-methods 获取optionsAPi方法
go-loading 加载数据的loading
get-list-params api请求的额外参数 参数
size下拉加载的size
selectedChange选中事件
total为options的总数量
search-key 远程索索key
get-list-format otions展示的数据格式
例如:
getListFormat: (list = []) => { // 下拉框数据格式
return list.map(({ name, id, certNo }) => ({ label: name, value: id, certNo }))
},
Compiles and minifies for production
Lints and fixes files