fix: RouteKey组件taskType属性默认undefined

This commit is contained in:
dhb52 2024-05-13 09:58:41 +08:00
parent b75379a3a3
commit 23deefd49a

View File

@ -12,10 +12,7 @@ interface Props {
taskType?: Api.Common.TaskType;
}
const props = withDefaults(defineProps<Props>(), {
// HACK: ``,
taskType: 1
});
const props = defineProps<Props>();
interface Emits {
(e: 'update:value', value: Api.Common.RouteKey): void;
@ -33,7 +30,7 @@ const selectOptions = computed(() => {
if (props.taskType === 2 || props.taskType === 3) {
return translateOptions(routeKeyRecordOptions.filter(o => o.value === 4));
}
// 1: ==>
// undefined, 1: ==>
return translateOptions(routeKeyRecordOptions);
});
</script>