Primeng inputMask autoClear 无法按照文档工作

Primeng inputMask autoClear not working as per documentation

根据文档,使用 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"