Bug Type: TypeScript
Environment
- Vue Version:
3.2.47
- Element Plus Version:
2.3.1
- Browser / OS:
Chrome
- Build Tool:
Vite
Reproduction
Related Component
el-backtop
el-skeleton
el-option
Reproduction Link
Element Plus Playground
Steps to reproduce
I am using WebStorm.
Some components' props type cannot be recognized if passing ref type.
What is Expected?
should support
What is actually happening?
ElOption
Type string is not assignable to type InferPropType<{required: true, type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[]}> Type string is not assignable to type never
ElSkeleton
Type unknown is not assignable to type import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown> Type unknown is not assignable to type boolean
ElBacktop
Type unknown is not assignable to type number
Additional comments
maybe related: #6244
Document example is using ref: https://element-plus.org/zh-CN/component/skeleton.html#%E5%8A%A0%E8%BD%BD%E7%8A%B6%E6%80%81
8条答案
按热度按时间7uhlpewt1#
Is there a volar plugin installed?
jpfvwuh42#
volar
No
In addition, I am using Nuxt3.
bpzcxfmw3#
Try installing the volar plugin?
uqdfh47h4#
https://nuxt.com/modules/element-plus
hi3rlvi25#
volar
I already installed this module, is there a package named volar?
q3qa4bjr6#
volar is ide plugin
b4wnujal7#
volar is ide plugin
Seems that plugin does not support WebStorm
vuejs/language-tools#571 (comment)
exdqitrt8#
This looks like your IDE cannot infer the correct type