在编写一个菜单组件的过程中,敲到AntdMenu时,有如下报错:
AntdMenu refers to a value, but is being used as a type here.
把import语句补上后,还是报错,查了下,原来问题出在文件类型,我的文件类型是ts,应该在tsx
文件里编写React组件。
在编写一个菜单组件的过程中,敲到AntdMenu时,有如下报错:
AntdMenu refers to a value, but is being used as a type here.
把import语句补上后,还是报错,查了下,原来问题出在文件类型,我的文件类型是ts,应该在tsx
文件里编写React组件。