@riil-frontend/component-res-type-selection

资源类型选择器

Usage no npm install needed!

<script type="module">
  import riilFrontendComponentResTypeSelection from 'https://cdn.skypack.dev/@riil-frontend/component-res-type-selection';
</script>

README

资源类型选择器

res-type-selection

资源类型选择器

API

资源选择类型组件

参数 说明 必填 类型 默认值 备注
data 资源候选数据源,数据源结构:[{id:String,icon:String,label:String,children:[{id:string,icon:string,parentId:"1",children:[{id:String,icon:String,label:String,count:String,parentId:String }]}]}] Array []
selectedRes 已选资源类型 Array []
isOpenSubCom 是否显示子组件 Boolean false
mode 选择模式:
'single', 'multiple'

可选值:
'single', 'multiple
String single
onChange 选择改变回调,回调参数为资源 id 数组,已选资源数据数组 selectedDatas,是否为打开子组件状态 checked,

签名:
Function(ids:Array,selectedDatas:Array,checked:Boolean) => void
Function
isShowSwitch 主子资源切换 switch 是否显示 Boolean true
isShowAnchors 是否显示锚点导航 Boolean true
isShowSearchSelect 是否显示搜索选择框 Boolean true