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