@riil-frontend/component-riil-rule-tree

intro component

Usage no npm install needed!

<script type="module">
  import riilFrontendComponentRiilRuleTree from 'https://cdn.skypack.dev/@riil-frontend/component-riil-rule-tree';
</script>

README

规则树

riil-rule-tree

规则树

API

参数名 说明 必填 类型 默认值 备注
initValues 配置项初始值 - Array [{ relation: 'and', children: [{ key: '1' }] }] -
fields 每一行表达式的配置 Array - -
onChange 配置项改变的回调事件

签名:
Function(dataSource: Array, changeValues, index) => void
参数:
dataSource: {Array} 所有配置项的值
changevalues: {Array} 当前修改的配置项的值
index: {Array} 当前修改的配置项的 index
- Function - -
defaultAddRelation 新增条件组关系时的默认关系 - String 'and' 'and' 'or'
defaultAddFieldsValue 新增条件组关系时的默认值 - Object { relation: 'and', children: [{ key: 1 }] } -
ruleTreeProps RuleTree组件属性透传 - Object - -