我有一个包含以下 devstack(Vue3、Vite、TypeScript)的项目,但出现以下错误v-slot:
Element implicitly has an 'any' type because expression of type '"default"' can't be used to index type '{} | {}'.
Property 'default' does not exist on type '{} | {}'.ts(7053)
Run Code Online (Sandbox Code Playgroud)
<DataWrapper v-slot="{ values }">
data: {{ values }}
</DataWrapper>
Run Code Online (Sandbox Code Playgroud)
DataWrapper组件像这样将 props 注入到插槽中
...
<slot :values="data"></slot>
...
Run Code Online (Sandbox Code Playgroud)
它确实编译并按预期工作,但错误仍然存在。知道如何解决这个问题吗?太感谢了。