CascadeList
级联列表容器
API
| 参数 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| parentField | 父节点字段名 | string | - |
| hasChildrenField | 是否存在子节点字段名 | string | - |
| iconField | icon字段名 | string | - |
| depthLimit | 最大深度 | number | - |
| condition | 筛选条件,根据筛选条件获取树形数据 | string | - |
| onAdd | 点击 + 号触发 Action | string | function | - |
| columnTitles | 列标题 | string[] | - |
| onSelect | 选中行数据触发 Action | string | function | - |
| onDataLoaded | 节点加载完毕后对节点的操作 | nodes => void | - |
| dataSourceAction | 数据容器获取数据来源 Action | string | - |
通用标签见: 容器通用标签
用法
基础用法
<View title="级联容器"> <CascadeList model="trantor_doc_Tree" parentField="parent" depthLimit="4"> <Fields> <Field name="name" /> </Fields> </CascadeList></View>操作
<View title="级联容器"> <CascadeList model="trantor_doc_Tree" parentField="parent" depthLimit="2" onAdd="trantor_doc_Tree_create" @onSelect="handlerSelect"> <Fields> <Field name="name"/> </Fields> <RecordActions> <Action label="编辑" action="trantor_doc_Tree_update" /> <Action label="删除" action="trantor_doc_Tree_delete" after="Refresh" /> </RecordActions> </CascadeList></View>