# FxUI.objectUIAction.selectObject(objectApiName, options)

该方法允许开发人员选择对象数据。

# 参数

参数 说明 类型 可选值 默认值
objectApiName 业务对象apiName(必填) string
options 其他参数 object
# options
参数 说明 类型 可选值 默认值
target_related_list_name 关联列表api_name(可在后台管理当前字段的设置界面差看到) string
single 是否单选 boolean false
maxNum 最大数量限制 number
wheres 查关联数据时的筛选条件 object
selected 已选数据 array
lookup_field_api_name 对应的lookup字段的api_name string
target_related_list_name lookup字段创建时生成的关联对象列表的api_name number

# 结果

{
    objectApiName,
    objectList: Array
}

# 用法

该方法返回一个 Promise对象,示例如下:

import FxUI from 'fxui-mobile';

FxUI.objectUIAction.selectObject('AccountObj').then(res => {
    // todo what you want
})

FxUI.objectUIAction.selectObject('AccountObj', {
    single: true,
    maxNum: 6
}).then(res => {
    // todo what you want
})
lastUpdate: 2022-4-20 00:00:29