-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Closed
Description
Version
3.2.25
Reproduction link
Steps to reproduce
See reproduction link
What is expected?
Both components Test1
and Test2
behave consistently
What is actually happening?
The Test1 component is written in such a way that the props defined by the generic parameters are missing(BTW my IDE code hints work fine), in fact the option of the component has no props
option, and the additional definition of props
like the following will make it work correctly.
import { defineComponent, ref } from "vue";
const HelloWorld = defineComponent<{ msg: string }>(({ msg }) => {
// some code
});
HelloWorld.props = { msg: { type: String } };
export default HelloWorld;
Does this mean that defineComponent requires adding additional options
such as props
? Or is this a working feature?
I just want to make it easier to use JSX instead of SFC, and more functional, maybe there are some compile-time plugins here that can make this write work for me?
Metadata
Metadata
Assignees
Labels
No labels