fix: bug#10986
This commit is contained in:
parent
1f16b4e827
commit
8c66b348a3
|
@ -23,7 +23,8 @@ const { data } = storeToRefs(sceneStore);
|
|||
|
||||
const actionRules = [{
|
||||
validator(_: any, v?: BranchesThen[]) {
|
||||
if (!v || (v && !v.length) || (v && v.length && !v[0].actions.length)) {
|
||||
|
||||
if (!v || (v && !v.length) || !v.some(item => item.actions && item.actions.length)) {
|
||||
return Promise.reject('至少配置一个执行动作');
|
||||
}
|
||||
return Promise.resolve();
|
||||
|
|
|
@ -59,7 +59,7 @@ const rules = [{
|
|||
|
||||
const actionRules = [{
|
||||
validator(_: any, v?: BranchesThen[]) {
|
||||
if (!v || (v && !v.length)) {
|
||||
if (!v || (v && !v.length) || !v.some(item => item.actions && item.actions.length)) {
|
||||
return Promise.reject('至少配置一个执行动作');
|
||||
}
|
||||
return Promise.resolve();
|
||||
|
|
|
@ -13,11 +13,8 @@ export const handleParamsData = (data: any[], key: string = 'column'): any[] =>
|
|||
|
||||
export const thenRules = [{
|
||||
validator(_: string, value: any) {
|
||||
if (!value || (value && !value.length)) {
|
||||
if (!value || (value && !value.length) || !v.some(item => item.actions && item.actions.length)) {
|
||||
return Promise.reject('至少配置一个执行动作')
|
||||
} else {
|
||||
const isActions = value.some((item: any) => item.actions && item.actions.length)
|
||||
return isActions ? Promise.resolve() : Promise.reject('至少配置一个执行动作');
|
||||
}
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue