Skip to content

使用HTML元素默认属性组件(inheritAttrs)希望增加对Typescript支持 #5089

@yangtianxia

Description

@yangtianxia
  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

在使用有继承HTML元素默认属性的组件情况下,typescript验证无法通过,目前没有在官方找到解决的办法!

目前的解决办法就只有手动导出后,再重新定义

import type { InputHTMLAttributes } from 'vue'
import type { CustomShim } from '../utils'

import { Input as _Input } from 'ant-design-vue'

type _InputOption = typeof _Input

const Input = _Input as _InputOption & CustomShim<InputHTMLAttributes>

export default { Input }
export { Input }

What does the proposed API look like?

any

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions