-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
[Feature Request] El Table Column should carry type definition in default slot #3233
Comments
Yes, this is a problem, are you interested in fixing it? |
|
The snippet is copied from the official doc. But I'm actually using |
@adaex will give it a try but may not have enough context. If anyone else wants to help, it's very appreciated. |
Vue doesn’t seem to implement this feature yet |
Don't worry, go ahead and try it. There are many enthusiastic developers. |
@sxzz Thanks. Good to know.. will follow the RFC. |
关注到了这个问题,不仅仅是El Table Column,目前应该是所有带有 scope slot 的组件都没有类型支持,这对于 ts 项目开发有很大的影响,希望能尽快提交PR完善这个需求。 例如: <template #default="{ row: { type } }">
{{ types[type] }} // types 是一个对象,这将导致 type 不能作为索引,因为它是一个 any,意味着我必须额外书写一个函数来实现
</template> |
需要等待 Vue 支持。相关的 RFC 讨论 vuejs/rfcs#192 。 |
There are |
Been wondering how's the process going on, is there anyone working on using defineSlots to define types for those slots ? |
First, we need to move to 3.3.
|
Existing Component
Yes
Component Name
El Table Column
Description
When using typescript and rendering a custom table column template like below
the
scope.row
does not carry any type definition. It should be able to infer from thedata
property passed into the table. i.e.The text was updated successfully, but these errors were encountered: