diff --git a/packages/amis-editor/src/plugin/Card.tsx b/packages/amis-editor/src/plugin/Card.tsx
index 0751f74b3..7e5f8e50b 100644
--- a/packages/amis-editor/src/plugin/Card.tsx
+++ b/packages/amis-editor/src/plugin/Card.tsx
@@ -130,6 +130,11 @@ export class CardPlugin extends BasePlugin {
label: '图片地址',
description: '支持模板语法如: \\${xxx}
'
},
+ {
+ name: 'href',
+ type: 'input-text',
+ label: '打开外部链接'
+ },
getSchemaTpl('cardDesc'),
{
name: 'header.highlight',
diff --git a/packages/amis-editor/src/plugin/Cards.tsx b/packages/amis-editor/src/plugin/Cards.tsx
index 0e401317d..0f3d35e30 100644
--- a/packages/amis-editor/src/plugin/Cards.tsx
+++ b/packages/amis-editor/src/plugin/Cards.tsx
@@ -106,11 +106,6 @@ export class CardsPlugin extends BasePlugin {
type: 'divider'
},
getSchemaTpl('title'),
- {
- name: 'href',
- type: 'input-text',
- label: '打开外部链接'
- },
isCRUDBody
? null
diff --git a/packages/amis-editor/src/plugin/Form/Form.tsx b/packages/amis-editor/src/plugin/Form/Form.tsx
index f388b99ff..d6e54948f 100644
--- a/packages/amis-editor/src/plugin/Form/Form.tsx
+++ b/packages/amis-editor/src/plugin/Form/Form.tsx
@@ -873,6 +873,25 @@ export class FormPlugin extends BasePlugin {
]
},
+ {
+ name: 'labelAlign',
+ label: '标签对齐方式',
+ type: 'button-group-select',
+ size: 'sm',
+ visibleOn: "${mode === 'horizontal'}",
+ pipeIn: defaultValue('right', false),
+ options: [
+ {
+ label: '左对齐',
+ value: 'left'
+ },
+ {
+ label: '右对齐',
+ value: 'right'
+ }
+ ]
+ },
+
getSchemaTpl('horizontal', {
visibleOn: 'this.mode == "horizontal"'
}),
diff --git a/packages/amis-editor/src/plugin/Form/Item.tsx b/packages/amis-editor/src/plugin/Form/Item.tsx
index 1d66a5ea8..175a08729 100644
--- a/packages/amis-editor/src/plugin/Form/Item.tsx
+++ b/packages/amis-editor/src/plugin/Form/Item.tsx
@@ -105,16 +105,7 @@ export class ItemPlugin extends BasePlugin {
label: '只读模式'
})
: null,
- getSchemaTpl('switch', {
- name: 'disabled',
- label: '禁用',
- mode: 'horizontal',
- horizontal: {
- justify: true,
- left: 8
- },
- inputClassName: 'is-inline '
- }),
+ getSchemaTpl('disabled'),
ignoreValidator ? null : getSchemaTpl('required'),
getSchemaTpl('description'),
getSchemaTpl('placeholder'),
@@ -173,8 +164,6 @@ export class ItemPlugin extends BasePlugin {
{
title: '显隐',
body: [
- // TODO: 有些表单项没有 disabled
- getSchemaTpl('disabled'),
getSchemaTpl('visible'),
supportStatic ? getSchemaTpl('static') : null,
getSchemaTpl('switch', {
diff --git a/packages/amis-editor/src/plugin/Form/Picker.tsx b/packages/amis-editor/src/plugin/Form/Picker.tsx
index bcfea3158..3687a0dad 100644
--- a/packages/amis-editor/src/plugin/Form/Picker.tsx
+++ b/packages/amis-editor/src/plugin/Form/Picker.tsx
@@ -189,9 +189,6 @@ export class PickerControlPlugin extends BasePlugin {
getSchemaTpl('strictMode'),
getSchemaTpl('multiple'),
- getSchemaTpl('joinValues'),
- getSchemaTpl('delimiter'),
- getSchemaTpl('extractValue'),
getSchemaTpl('autoFillApi', {
visibleOn:
'!this.autoFill || this.autoFill.scene && this.autoFill.action'
diff --git a/packages/amis-editor/src/renderer/StatusControl.tsx b/packages/amis-editor/src/renderer/StatusControl.tsx
index 5efa959fb..ea8ab645d 100644
--- a/packages/amis-editor/src/renderer/StatusControl.tsx
+++ b/packages/amis-editor/src/renderer/StatusControl.tsx
@@ -93,13 +93,25 @@ export class StatusControl extends React.Component<
@autobind
handleSwitch(value: boolean) {
const {trueValue, falseValue} = this.props;
+ const {expression, statusType = 1} = this.state.formData || {};
this.setState({checked: value == trueValue ? true : false}, () => {
const {onBulkChange, noBulkChange, onDataChange, expressionName, name} =
this.props;
- const newData = {
- [name]: value == trueValue ? trueValue : falseValue,
+
+ const newData: Record = {
+ [name]: value == falseValue ? falseValue : undefined,
[expressionName]: undefined
};
+ if (value == trueValue) {
+ switch (statusType) {
+ case 1:
+ newData[name] = trueValue;
+ break;
+ case 2:
+ newData[expressionName] = expression;
+ break;
+ }
+ }
!noBulkChange && onBulkChange && onBulkChange(newData);
onDataChange && onDataChange(newData);
});
diff --git a/packages/amis-ui/scss/components/form/_transfer.scss b/packages/amis-ui/scss/components/form/_transfer.scss
index 619cbf1cd..fbb24dd3a 100644
--- a/packages/amis-ui/scss/components/form/_transfer.scss
+++ b/packages/amis-ui/scss/components/form/_transfer.scss
@@ -564,7 +564,7 @@
}
}
.#{$ns}TransferDropDown-content {
- min-width: px2rem(400px);
+ min-width: px2rem(40px);
display: flex;
flex-direction: column;
padding: var(--gap-xs) 0;