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

[Bug Report] 组件类型丢失 #22883

Open
wen403 opened this issue May 22, 2024 · 0 comments
Open

[Bug Report] 组件类型丢失 #22883

wen403 opened this issue May 22, 2024 · 0 comments

Comments

@wen403
Copy link

wen403 commented May 22, 2024

Element UI version

2.15.14

OS/Browsers version

windows / google

Vue version

2.7.16

Reproduction Link

https://stackblitz.com/edit/vitejs-vite-rwxhvw?file=package.json

Steps to reproduce

使用组件时无类型提示

image

What is Expected?

有正确的组件类型提示

import { ElementUIComponent, ElementUIComponentSize } from './component'

/** Button type */
export type ButtonType = 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text'

/** Same as native button's type */
export type ButtonNativeType = 'button' | 'submit' | 'reset' | 'menu'

/** Button Component */
export declare class ElButton extends ElementUIComponent {
  /** Button size */
  size: ElementUIComponentSize

  /** Button type */
  type: ButtonType

  /** Determine whether it's a plain button */
  plain: boolean

  /** Determine whether it's a round button */
  round: boolean

  /** Determine whether it's loading */
  loading: boolean

  /** Disable the button */
  disabled: boolean

  /** Button icon, accepts an icon name of Element icon component */
  icon: string

  /** Same as native button's autofocus */
  autofocus: boolean

  /** Same as native button's type */
  nativeType: ButtonNativeType
}

What is actually happening?

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

No branches or pull requests

1 participant