|
@@ -30,19 +30,6 @@ const computedModelValue = computed({
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
|
|
-watch(
|
|
|
|
- computedModelValue.value,
|
|
|
|
- (n) => {
|
|
|
|
- let skipCondition = '@@' + n.conditionType + '@@|'
|
|
|
|
- if (n.conditionType !== 'spel') {
|
|
|
|
- skipCondition =
|
|
|
|
- skipCondition + (n.condition ? n.condition : '') + '@@' + n.conditionType + '@@'
|
|
|
|
- }
|
|
|
|
- n.skipCondition = skipCondition + (n.conditionValue ? n.conditionValue : '')
|
|
|
|
- },
|
|
|
|
- { deep: true }
|
|
|
|
-)
|
|
|
|
-
|
|
|
|
const config: FormConfigType[] = [
|
|
const config: FormConfigType[] = [
|
|
{
|
|
{
|
|
type: 'input',
|
|
type: 'input',
|
|
@@ -69,7 +56,8 @@ const config: FormConfigType[] = [
|
|
type: 'input',
|
|
type: 'input',
|
|
prop: 'condition',
|
|
prop: 'condition',
|
|
label: '跳转条件名',
|
|
label: '跳转条件名',
|
|
- if: () => props.skipConditionShow && computedModelValue.value.conditionType != 'spel'
|
|
|
|
|
|
+ if: () => props.skipConditionShow && computedModelValue.value.conditionType != 'spel',
|
|
|
|
+ change: () => updateSkipCondition()
|
|
},
|
|
},
|
|
{
|
|
{
|
|
type: 'select',
|
|
type: 'select',
|
|
@@ -113,13 +101,25 @@ const config: FormConfigType[] = [
|
|
label: 'spel表达式'
|
|
label: 'spel表达式'
|
|
}
|
|
}
|
|
],
|
|
],
|
|
- if: () => props.skipConditionShow
|
|
|
|
|
|
+ if: () => props.skipConditionShow,
|
|
|
|
+ change: () => updateSkipCondition()
|
|
},
|
|
},
|
|
{
|
|
{
|
|
type: 'input',
|
|
type: 'input',
|
|
prop: 'conditionValue',
|
|
prop: 'conditionValue',
|
|
label: '条件值',
|
|
label: '条件值',
|
|
- if: () => props.skipConditionShow
|
|
|
|
|
|
+ if: () => props.skipConditionShow,
|
|
|
|
+ change: () => updateSkipCondition()
|
|
}
|
|
}
|
|
]
|
|
]
|
|
|
|
+
|
|
|
|
+function updateSkipCondition() {
|
|
|
|
+ const value = computedModelValue.value
|
|
|
|
+
|
|
|
|
+ let skipCondition = '@@' + value.conditionType + '@@|'
|
|
|
|
+ if (value.conditionType !== 'spel') {
|
|
|
|
+ skipCondition += (value.condition ?? '') + '@@' + value.conditionType + '@@'
|
|
|
|
+ }
|
|
|
|
+ value.skipCondition = skipCondition + (value.conditionValue ?? '')
|
|
|
|
+}
|
|
</script>
|
|
</script>
|