DevCloudFE / ng-devui

Angular UI Component Library based on DevUI Design
https://devui.design
MIT License
1.75k stars 210 forks source link

🐛 [Bug]: select弹出的下拉菜单选项的宽度失效 #292

Closed pony-xiaoma1 closed 1 year ago

pony-xiaoma1 commented 1 year ago

Version

13.3.0

Angular Version

13.1.2

Link to minimal reproduction

1

Step to reproduce

1

What is expected

https://devui.design/13.3.0/components/zh-cn/select/demo#object-filter

图片

组件库html代码: <d-select [options]="options2" [isSearch]="true" [filterKey]="'name'" [(ngModel)]="currentOption4" [placeholder]="'Search'">

What is actually happening

图片

本人html代码: <d-select [options]="type | keyvalue" [filterKey]="'value'" [isSearch]="true">

Any additional comments (optional)

No response

Simplelegant commented 1 year ago

demo中的效果需要开启扩展主题,建议参考主题化使用指南或如下代码

  1. 在main.ts中引入主题初始化服务和扩展风格4套主题
    import { ThemeServiceInit } from 'ng-devui/theme';
    import {
    infinityTheme,
    sweetTheme,
    provenceTheme,
    deepTheme,
    } from 'ng-devui/theme-collection';
  2. 在main.ts中初始化4套主题服务,并将默认主题置为无限主题
    ThemeServiceInit({
    'infinity-theme': infinityTheme,
    'provence-theme': provenceTheme,
    'sweet-theme': sweetTheme,
    'deep-theme': deepTheme,
    }, 'infinity-theme');

    ~~至此完成扩展风格主题的切换