From e632b295d44ed6adbf0034f443ba97798e4db1b1 Mon Sep 17 00:00:00 2001 From: fujianchao Date: Wed, 4 Dec 2024 14:59:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=8F=98=E9=87=8F?= =?UTF-8?q?=E5=91=BD=E5=90=8D=E5=86=B2=E7=AA=81=E5=AF=BC=E8=87=B4=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/zh-CN/components/form/picker.md | 2 +- packages/amis-editor/src/plugin/Form/Picker.tsx | 2 +- packages/amis/src/renderers/Form/Picker.tsx | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/zh-CN/components/form/picker.md b/docs/zh-CN/components/form/picker.md index a46bcbe651c..98539cff9c7 100755 --- a/docs/zh-CN/components/form/picker.md +++ b/docs/zh-CN/components/form/picker.md @@ -1211,7 +1211,7 @@ order: 35 | pickerSchema | `string` | `{mode: 'list', listItem: {title: '${label}'}}` | 即用 List 类型的渲染,来展示列表信息。更多配置参考 [CRUD](../crud) | | embed | `boolean` | `false` | 是否使用内嵌模式 | | overflowConfig | `OverflowConfig` | 参考[OverflowConfig](./#overflowconfig) | 开启最大标签展示数量的相关配置 `3.4.0` | -| removable | `removable` | `true` | 用于控制是否显示选中项的删除图标,默认值为 `true` | `6.10.0` | +| itemClearable | `itemClearable` | `true` | 用于控制是否显示选中项的删除图标,默认值为 `true` | `6.10.0` | ### OverflowConfig diff --git a/packages/amis-editor/src/plugin/Form/Picker.tsx b/packages/amis-editor/src/plugin/Form/Picker.tsx index fc7a328779f..6ea1c916350 100644 --- a/packages/amis-editor/src/plugin/Form/Picker.tsx +++ b/packages/amis-editor/src/plugin/Form/Picker.tsx @@ -402,7 +402,7 @@ export class PickerControlPlugin extends BasePlugin { }, { type: 'switch', - name: 'removable', + name: 'itemClearable', label: '选中项可删除', pipeIn: defaultValue(true), inputClassName: 'is-inline ' diff --git a/packages/amis/src/renderers/Form/Picker.tsx b/packages/amis/src/renderers/Form/Picker.tsx index 22cabc49ed0..67280caeb8e 100644 --- a/packages/amis/src/renderers/Form/Picker.tsx +++ b/packages/amis/src/renderers/Form/Picker.tsx @@ -105,7 +105,7 @@ export interface PickerControlSchema extends FormOptionsSchema { /** * 选中项可删除,默认为true */ - removable?: boolean; + itemClearable?: boolean; } export interface PickerProps extends OptionsControlProps { @@ -529,7 +529,7 @@ export default class PickerControl extends React.PureComponent< renderTag(item: Option, index: number) { const { - removable = true, + itemClearable = true, classPrefix: ns, classnames: cx, labelField, @@ -558,7 +558,7 @@ export default class PickerControl extends React.PureComponent< } )} > - {removable && ( + {itemClearable && (