fix(editor): 切换动作类型时清空关联配置字段

This commit is contained in:
roymondchen 2026-07-24 17:17:55 +08:00
parent b5abf31066
commit b564c9e4aa

View File

@ -210,6 +210,12 @@ const actionTypeConfig = computed(() => {
trigger: 'blur',
},
],
onChange: (_mForm: FormState, _v: string, { setModel }: any) => {
setModel('to', '');
setModel('method', '');
setModel('codeId', '');
setModel('dataSourceMethod', []);
},
};
return { ...defaultActionTypeConfig, ...props.config.actionTypeConfig };
});
@ -222,7 +228,7 @@ const targetCompConfig = computed(() => {
type: 'ui-select',
labelPosition: 'left',
display: (_mForm, { model }) => model.actionType === ActionType.COMP,
onChange: (_MForm, _v, { setModel }) => {
onChange: (_mForm, _v, { setModel }) => {
setModel('method', '');
},
rules: [