Skip to content

Modal的okButtonProps和cancelButtonProps,类型定义和文档有点问题 #2790

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

Closed
1 task
arika163 opened this issue Sep 4, 2020 · 3 comments
Closed
1 task
Labels

Comments

@arika163
Copy link

arika163 commented Sep 4, 2020

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

Version

1.6.5

Environment

windows10@1909,[email protected],[email protected]

Reproduction link

Edit on CodeSandbox

Steps to reproduce

https://codesandbox.io/s/ancient-water-fnwgp?file=/src/App.vue

What is expected?

见复现注释

What is actually happening?

文档上$confirm的okButtonProps和cancelButtonProps的类型是ButtonProps,实际使用时要传{props: ButtonProps, on: {}}才有效果
而且TypeScript下的类型提示也有问题,提示为
Type '{ props: { loading: true; }; }' is not assignable to type 'Button'.
Object literal may only specify known properties, but 'props' does not exist in type 'Button'. Did you mean to write '$props'?Vetur(2322)

@tangjinzhou
Copy link
Member

来个 pr ?

@like0413
Copy link

like0413 commented Sep 7, 2020

附议。确实有这个问题

tangjinzhou added a commit that referenced this issue Sep 23, 2020
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants