根据文档,使用autoClear="false"时不应清除无效输入,但它不起作用。
https://www.primefaces.org/primeng/showcase/#/inputmask
<p-inputMask autoClear="false" styleClass="form-control custom-input" placeholder="User phone number"
formControlName="phoneWork" maxlength="14" mask="(999) 999-9999"></p-inputMask>
您是否尝试过将"
添加到autoClear="false"
?
或者也许有[autoClear]="false"
?