axb-element-ui

0.2.2 • Public • Published

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


Customize configuration

See Configuration Reference.

Readme

Keywords

none

Package Sidebar

Install

npm i axb-element-ui

Weekly Downloads

11

Version

0.2.2

License

MIT

Unpacked Size

1.21 MB

Total Files

16

Last publish

Collaborators

  • ankouyang