Skip to content

Commit

Permalink
fix: 修复变量命名冲突导致功能失效
Browse files Browse the repository at this point in the history
  • Loading branch information
F-jianchao authored and CheshireJCat committed Dec 4, 2024
1 parent bd41fff commit e632b29
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/zh-CN/components/form/picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion packages/amis-editor/src/plugin/Form/Picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ export class PickerControlPlugin extends BasePlugin {
},
{
type: 'switch',
name: 'removable',
name: 'itemClearable',
label: '选中项可删除',
pipeIn: defaultValue(true),
inputClassName: 'is-inline '
Expand Down
6 changes: 3 additions & 3 deletions packages/amis/src/renderers/Form/Picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export interface PickerControlSchema extends FormOptionsSchema {
/**
* 选中项可删除,默认为true
*/
removable?: boolean;
itemClearable?: boolean;
}

export interface PickerProps extends OptionsControlProps {
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -558,7 +558,7 @@ export default class PickerControl extends React.PureComponent<
}
)}
>
{removable && (
{itemClearable && (
<span
className={cx(
`${ns}Picker-valueIcon`,
Expand Down

0 comments on commit e632b29

Please sign in to comment.