我在添加管理员的时候,通过组件multipleLimit限制只能选择一个身份,但是当我选择value为8的身份时,control组件不生效了,这该怎么处理呢?
Elm::select('roles', '身份',[])->options(function () {
$data = app()->make(RoleRepository::class)->getAllOptions(0);
$options = [];
foreach ($data as $value => $label) {
$options[] = compact('value', 'label');
}
return $options;
})->control([
['value'=>8,'rule'=>[
Elm::select('jb_1', '平台管理员', [])->options(function () {
$data = app()->make(AdminRepository::class)->getAllOptions(6);
$options = [];
foreach ($data as $value => $label) {
$options[] = compact('value', 'label');
}
return $options;
})->multiple(false),
]],
['value'=>11,'rule'=>[
Elm::select('jb_1', '平台管理员', [])->options(function () {
$data = app()->make(AdminRepository::class)->getAllOptions(6);
$options = [];
foreach ($data as $value => $label) {
$options[] = compact('value', 'label');
}
return $options;
})->multiple(false),
Elm::select('jb_2', '其他管理员', [])->options(function () {
$data = app()->make(AdminRepository::class)->getAllOptions(8);
$options = [];
foreach ($data as $value => $label) {
$options[] = compact('value', 'label');
}
return $options;
})->multiple(false),
]]
])->multiple(true)->multipleLimit(1),
{{item.user_info.nickname ? item.user_info.nickname : item.user_name}}
作者 管理员 企业
{{itemf.name}}
{{itemc.user_info.nickname}}
{{itemc.user_name}}
回复 {{itemc.comment_user_info.nickname}}
{{itemf.name}}