@alilc/lowcode-setter-behavior
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Behavior Setter

@alilc/lowcode-setter-behavior

API

参数名 说明 必填 类型 默认值 备注
field 引擎传入属性 true SettingTarget - -
onChange 引擎传入属性,setter 值变化需要调用 onChange 告知引擎 true (value: any) => void - -
actions 待配置的事件列表 true string[] ['onActionClick', 'onClick']
type link or modal or both false string -
value 引擎传入属性,当前值 true any -
url 当前搭建平台获取页面列表的 api false string
responseFormatter 当前搭建平台获取页面列表 api 的返回值处理函数,要将返回值处理成 [{ label: string, value: any }] false (response: any) => ([{ label: string, value: any }]) -
extraBehaviorActions 自定义交互 false BehaviorAction

Interfaces

export interface BehaviorAction<Value = Record<string, any>, Options = Record<string, any>> {
  /** 行为key */
  name: string;
  /** 行为名字,显示在RadioGroup选项 */
  title: string;
  /** 选项渲染 */
  render?: (props: BehaviorActionProps<Value, Options>) => React.ReactNode;
  /** 值序列化为低代码协议的值 */
  toActionValue: (value: Value) => any;
}

Readme

Keywords

Package Sidebar

Install

npm i @alilc/lowcode-setter-behavior

Weekly Downloads

94

Version

1.0.0

License

MIT

Unpacked Size

1.14 MB

Total Files

32

Last publish

Collaborators

  • 1ncounter
  • leoyuan
  • whatever_lll
  • yang1996
  • jun.li
  • qingniaotonghua
  • woshilaoge
  • jack.lianjie
  • otakuxv
  • zyy7259
  • sun2ama
  • hujiulong
  • liujuping123
  • akirakai
  • xingmolu
  • eternalsky
  • mark-ck
  • hzd822
  • clarencep
  • alvarto
  • leoyuan88