Merge branch 'pre-release' into feat-optimize-5

Change-Id: I2121779148e90850d2fbcdddaccc1b9851df2045
This commit is contained in:
jiatianqi 2022-08-11 19:17:47 +08:00
commit d077ee238f
8 changed files with 89 additions and 40 deletions

View File

@ -8,7 +8,6 @@ export class FieldSetControlPlugin extends BasePlugin {
// 关联渲染器名字
rendererName = 'fieldset';
$schema = '/schemas/FieldSetControlSchema.json';
disabledRendererPlugin = true; // 组件面板不显示
// 组件名称
name = '字段集';

View File

@ -415,6 +415,18 @@ export class FormPlugin extends BasePlugin {
getSchemaTpl('submitOnChange'),
getSchemaTpl('switch', {
label: '禁用回车提交表单',
name: 'preventEnterSubmit',
labelRemark: {
className: 'm-l-xs',
trigger: 'click',
rootClose: true,
content: '设置后无法通过键盘 “回车” 按键进行表单提交',
placement: 'left'
}
}),
getSchemaTpl('switch', {
label: '提交完后重置表单',
name: 'resetAfterSubmit',

View File

@ -208,14 +208,10 @@ export class TextControlPlugin extends BasePlugin {
form.changeValue('validationErrors', {...validationErrors});
}
}),
// getSchemaTpl('value'),
getSchemaTpl('valueFormula', {
rendererSchema: context?.schema
}),
getSchemaTpl('clearable'),
// getSchemaTpl('multiple',{
// visibleOn: `${isText} || ${isUrl}`
// }),
getSchemaTpl('showCounter', {
visibleOn: `${isText} || ${isPassword}`
}),
@ -269,40 +265,63 @@ export class TextControlPlugin extends BasePlugin {
]
}
},
// {
// type: 'ae-Switch-More',
// mode: 'normal',
// label: tipedLabel(
// '自动补全',
// '根据输入内容,调用接口提供选项。当前输入值可用${term}变量'
// ),
// visibleOn: isText,
// formType: 'extend',
// defaultData: {
// autoComplete: {
// method: 'get',
// url: ''
// }
// },
// form: {
// body: [
// getSchemaTpl('apiControl', {
// name: 'autoComplete',
// label: '接口',
// description: '',
// visibleOn: 'data.autoComplete !== false',
// footer: []
// })
// ]
// }
// },
getSchemaTpl('labelRemark'),
getSchemaTpl('remark'),
getSchemaTpl('placeholder'),
getSchemaTpl('description')
]
},
{
title: '选项',
visibleOn: `${isText} && (data.options || data.autoComplete || data.source)`,
body:[
getSchemaTpl('optionControlV2'),
getSchemaTpl('multiple',{
visibleOn: `${isText} || ${isUrl}`
}),
{
type: 'ae-Switch-More',
mode: 'normal',
label: tipedLabel(
'自动补全',
'根据输入内容,调用接口提供选项。当前输入值可用${term}变量'
),
visibleOn: isText,
formType: 'extend',
defaultData: {
autoComplete: {
method: 'get',
url: ''
}
},
form: {
body: [
getSchemaTpl('apiControl', {
name: 'autoComplete',
label: '接口',
description: '',
visibleOn: 'data.autoComplete !== false'
}),
{
label: tipedLabel(
'显示字段',
'选项文本对应的数据字段,多字段合并请通过模板配置'
),
type: 'input-text',
name: 'labelField',
placeholder: '选项文本对应的字段',
},
{
label: '值字段',
type: 'input-text',
name: 'valueField',
placeholder: '值对应的字段'
}
]
}
},
]
},
getSchemaTpl('status', {
isFormItem: true,
readonly: true

View File

@ -138,9 +138,7 @@ export class RadiosControlPlugin extends BasePlugin {
]
},
getSchemaTpl('status', {isFormItem: true}),
getSchemaTpl('validation', {
tag: ValidatorTag.All
})
getSchemaTpl('validation', {tag: ValidatorTag.MultiSelect})
])
},
{

View File

@ -214,7 +214,12 @@ export class SelectControlPlugin extends BasePlugin {
getSchemaTpl('switch', {
label: '单行显示选中值',
name: 'valuesNoWrap'
})
}),
{
type: 'input-number',
name: 'maxTagCount',
label: tipedLabel('标签展示数','标签的最大展示数量,超出数量后以收纳浮层的方式展示,默认全展示'),
}
]
}),
getSchemaTpl('checkAll'),
@ -279,6 +284,15 @@ export class SelectControlPlugin extends BasePlugin {
})
]
},
{
title: '高级',
body: [
getSchemaTpl('switch', {
label: tipedLabel('选项值检查', '开启后当选项值未匹配到当前options中的选项时选项文本飘红'),
name: 'showInvalidMatch'
})
]
},
getSchemaTpl('status', {isFormItem: true}),
getSchemaTpl('validation', {tag: ValidatorTag.MultiSelect})
])

View File

@ -350,6 +350,7 @@ export default class FormulaControl extends React.Component<
// 设置统一的占位提示
if (curRendererSchema.type === 'select') {
curRendererSchema.placeholder = '请选择默认值';
curRendererSchema.inputClassName= 'ae-editor-FormulaControl-select-style'
} else {
curRendererSchema.placeholder = '请输入静态默认值';
}

View File

@ -734,7 +734,7 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
items: [
{
name: 'key',
type: 'select',
type: 'input-text',
placeholder: '变量名',
source: '${__setValueDs}',
labelField: 'label',
@ -789,10 +789,10 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
items: [
{
name: 'key',
type: 'select',
type: 'input-text',
source: '${__setValueDs}',
labelField: 'label',
valueField: 'name',
valueField: 'value',
required: true,
visibleOn: `data.__rendererName && ${SHOW_SELECT_PROP}`,
},

View File

@ -503,6 +503,12 @@ setSchemaTpl('submitOnChange', {
type: 'switch',
label: '修改即提交',
name: 'submitOnChange',
mode: 'horizontal',
horizontal: {
justify: true,
left: 8
},
inputClassName: 'is-inline ',
labelRemark: {
trigger: 'click',
className: 'm-l-xs',