📜  离子输入模糊以编程方式 - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:43.634000             🧑  作者: Mango

代码示例1
In your view:


In your component.ts you get the element as a view-child:
@ViewChild('myNumberInput', { static: false }) myNumberInput: IonInput;

And then you can blur the element from anywhere in your code by bluring the inner input-element:
this.myNumberInput.getInputElement().then(
    inputElement => inputElement.blur()
);