簡體   English   中英

文字輸入內的可點擊圖標

[英]Clickable icon inside text input

我有一個切換開關,我想添加一個像我的切換開關一樣的圖標

我想在文本字段中添加一個可單擊的圖標。

Textfield.html

<ion-input   id="text"  [ngModel]="text"  rows="1"  type="text"></ion-input>
<ion-toggle class="toggle-small" toggle-class="toggle-calm" id="toggle" (ionChange)="add(ioToggle.checked)"  #ioToggle ></ion-toggle>

有沒有一種方法可以在輸入中添加圖標,並且會像切換按鈕一樣起作用?

試試這個:您的file.html

    <ion-input id="text" rows="1" type="text"></ion-input>
  </div>
  <button id="button" ion-button icon-only clear>
  </button>
</div>

file.scss

.Test #button {
  vertical-align: top; // change this 
  display: inline-block;
  width: 25px;
  margin: 0;
  padding: 0;
  position: relative;
  top: -12px; //change this too
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM