@hecom/button
v1.0.0
Published
Button Register and Management
Readme
Button
这是按钮模块的管理,包括注册、取消注册和获取方法。
接口:
name: string:模块名称。get: (appName, action, state, params) => function:获取应用操作对应的按钮的处理方式。registerGeneral: (appName, action, handle) => void:注册通用的应用操作按钮的处理方式。registerSpecial: (appName, action, special, handle) => string:注册特殊的应用操作按钮的处理方式,返回handleId。unregister: (appName, action, handleId) => boolean:取消注册通用或特殊的应用操作按钮的处理方式。Action:onFinish的回调操作键,包括:RefreshList: string:刷新列表。RefreshDetail: string:刷新详情。PopToParent: string:退回上一页
其中special特殊状态判断函数的参数、handle按钮操作处理函数的参数、state和params获取操作的结果的状态和结果参数,均为如下格式的对象:
buttonItem: object:按钮的原始数据配置信息。metaName: string:业务对象的名称。data: object:一条业务数据信息。onFinish: (options) => void:处理后的返回回调方法,options是一个对象,包含Actions中的键,对应值为boolean类型,表示是否调用该功能。
