Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TabPane的插槽类型仍然有问题 #6779

Open
5 tasks done
ReturnMars opened this issue Feb 26, 2025 · 1 comment
Open
5 tasks done

TabPane的插槽类型仍然有问题 #6779

ReturnMars opened this issue Feb 26, 2025 · 1 comment
Labels
untriaged need to sort

Comments

@ReturnMars
Copy link

描述错误

TabPane的插槽类型仍然有问题:类型“Readonly<{ default?: (() => VNode<RendererNode, RendererElement, { [key: string]: any; }>[]) | undefined; prefix?: (() => VNode<RendererNode, RendererElement, { ...; }>[]) | undefined; suffix?: (() => VNode<...>[]) | undefined; }>”上不存在属性“tab”。

复现步骤

直接install,然后使用TabPane的tab插槽

最小复现链接

系统信息

使用的包管理器

pnpm

验证

@ReturnMars ReturnMars added the untriaged need to sort label Feb 26, 2025
@Hanxven
Copy link

Hanxven commented Mar 3, 2025

同此问题。目前使用如下代码绕过类型检查。

import 'naive-ui'

declare module 'naive-ui' {
  interface TabPaneSlots {
    tab?: () => VNode[]
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
untriaged need to sort
Projects
None yet
Development

No branches or pull requests

2 participants