angular - 当我在 WAVE 扩展结果中为离子输入标签使用 clearInput 属性时,出现空按钮名称错误。有没有人遇到过类似的问题?
问题描述
我正在使用具有 clearInput 属性的离子输入标签。当我为我的网站使用 wave 扩展进行审核时,我收到了空按钮错误。那是因为图标“x”清除输入,因为图标没有名称 wave 显示错误。我该如何解决这个问题?实际代码是:<ion-input id="input-name" formControlName="name" clearInput></ion-input>
结果在浏览器中:
<ion-input _ngcontent-qcw-c39="" clearinput="" formcontrolname="name" id="input-name" ng-reflect-clear-input="" ng-reflect-name="name" class="ng-untouched ng-pristine ng-invalid sc-ion-input-md-h sc-ion-input-md-s md hydrated ion-untouched ion-pristine ion-invalid">
<input class="native-input sc-ion-input-md" aria-labelledby="ion-input-8-lbl" autocapitalize="off" autocomplete="off" autocorrect="off" name="ion-input-8">
<button type="button" class="input-clear-icon sc-ion-input-md" tabindex="-1"></button>
</ion-input>
解决方案
离子输入上的属性clearInput采用布尔值 true 或 false。默认情况下,它的值设置为 false。离子输入的示例是 -
<ion-input type="text" [clearInput]="true" placeholder="Enter value"></ion-input>
推荐阅读
- elasticsearch - elasticsearch search query returns "hits" blank
- node.js - 如何在多目标应用程序中访问不同的模块
- flutter - 如何从小部件创建图像?
- c++ - 如何将 GstVideoOrientationInterface 添加到 Gst 管道?
- testing - 由于源字符串,无法在机器人测试中比较字符串
- html - 用表格行 CSS 分页
- php - php循环全部导致下一个mysql查询
- facebook - Spark AR signal value
- angular-ng-if - Trying to provide hyperlink in HTML based on ng-if condition...not working
- css - 无法将 3rd 方 CSS 框架安装到 Vue 应用程序中