Answer the question
In order to leave comments, you need to log in
How to fix Vue + TypeScript error?
form.categoryId = computed(() => {
return storeCategory.getSelectedCategory.id;
});
(property) categoryId: number
Тип "ComputedRef<number>" не может быть назначен для типа "number"
Answer the question
In order to leave comments, you need to log in
What do you not understand from the description of the error?
You are trying to assign the object ComputedRef<number>
returned by the computed function to an object field declared as number.
You need to either change the type of the field, or update the field through watch.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question