Skip to content

auto-complete 组件无法使用option 或 options 等slot自定义下拉菜单 #7396

Closed
@zhou-ouha

Description

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

Version

4.1.0

Environment

vue@3.4.0 TS@5.3.3 ant-design-vue@4.1.2 edge@122.0.2365.59

Reproduction link

https://antdv.com/components/auto-complete-cn

Steps to reproduce

使用文档中说明的 option slot 或使用TS中定义的options slot 自定义下拉菜单的选项
https://codesandbox.io/p/sandbox/priceless-galois-3mhq5c

What is expected?

自定义菜单项,希望菜单项前面有一个选中图标

What is actually happening?

使用 option slot , TS会检查 option 这个slot不存在,在源码导出的几种 slot的类型,没有option
使用 options slot ,antdv 会报错 Warning: [ant-design-vue: AutoComplete] options' slot is deprecated, please use props "options"
instead

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