mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 19:08:45 +08:00
Checkboxes 快速编辑、删除,判断优化 (#1843)
* Checkboxes 快速编辑、删除,判断优化 * snapshot * fix
This commit is contained in:
parent
80434a12ec
commit
840e8e8faf
@ -10,7 +10,7 @@ import Checkbox from '../../components/Checkbox';
|
||||
import chunk from 'lodash/chunk';
|
||||
import {Icon} from '../../components/icons';
|
||||
import {Api} from '../../types';
|
||||
import {autobind} from '../../utils/helper';
|
||||
import {autobind, hasAbility} from '../../utils/helper';
|
||||
|
||||
/**
|
||||
* 复选框
|
||||
@ -165,7 +165,7 @@ export default class CheckboxesControl extends React.Component<
|
||||
description={option.description}
|
||||
>
|
||||
{String(option[labelField || 'label'])}
|
||||
{removable ? (
|
||||
{removable && hasAbility(option, 'removable') ? (
|
||||
<a data-tooltip={__('Select.clear')} data-position="left">
|
||||
<Icon
|
||||
icon="minus"
|
||||
@ -174,7 +174,7 @@ export default class CheckboxesControl extends React.Component<
|
||||
/>
|
||||
</a>
|
||||
) : null}
|
||||
{editable ? (
|
||||
{editable && hasAbility(option, 'editable') ? (
|
||||
<a data-tooltip="编辑" data-position="left">
|
||||
<Icon
|
||||
icon="pencil"
|
||||
|
Loading…
Reference in New Issue
Block a user