This commit is contained in:
@@ -19,6 +19,9 @@
|
||||
/></ElSelect>
|
||||
</ElFormItem>
|
||||
<ElFormItem label="上游可能已受理"><ElSwitch v-model="model.maybe_accepted" /></ElFormItem>
|
||||
<ElFormItem v-if="model.category === 'terminal'" label="自动关闭轮询"
|
||||
><ElSwitch v-model="model.auto_disable_polling" /><span>仅终态类别生效</span></ElFormItem
|
||||
>
|
||||
<ElFormItem label="匹配优先级"
|
||||
><ElInputNumber v-model="model.priority" :min="1" :max="10000" :precision="0" /><span
|
||||
>数值越小越先匹配</span
|
||||
@@ -35,7 +38,15 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { watch } from 'vue'
|
||||
import type { GatewayRuleInput, GatewayOptions } from '@/types/api/gateway'
|
||||
const model = defineModel<GatewayRuleInput>({ required: true })
|
||||
watch(
|
||||
() => model.value.category,
|
||||
(value) => {
|
||||
if (value !== 'terminal' && model.value.auto_disable_polling)
|
||||
model.value.auto_disable_polling = false
|
||||
}
|
||||
)
|
||||
defineProps<{ options: GatewayOptions; disabled?: boolean }>()
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user