[英]Angular 5 ng-select
我正在使用https://github.com/ng-select/ng-select 中的ng-select 組件。 然而,下拉菜單的內容在某些情況下太長了。 下拉列表中的字符串將被縮短...是否可以根據內容的長度使下拉列表大於輸入寬度? 可能使用 CSS 樣式(自定義)。
<div layout="row">
<label>Your first ng-select</label>
<ng-select class="custom" [items]="cities"
bindLabel="name"
placeholder="Select city"
[(ngModel)]="selectedCity">
</ng-select>
<label>Your first ng-select</label>
<ng-select class="custom" [items]="cities"
bindLabel="name"
placeholder="Select city"
[(ngModel)]="selectedCity">
</ng-select>
</div
.ng-select.custom .ng-value-container { height: 10px; }
這里 ng-select 是組件,custom 是類名。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.