在使用用户可以输入的 NativeScript 应用程序视图时,本机应用程序键盘输入会覆盖TextField
组件。虽然这不会阻止用户输入文本,但它会扰乱 UX 流程并且从 UI 的角度来看看起来很糟糕。
如何让键盘不覆盖输入,而是像其他本机应用程序一样出现在它下面?
更新 2
现在它不再覆盖,我注意到当我离开应用程序切换到另一个应用程序或挂起NativeScript 应用程序时,当我回到它时问题再次出现。我该怎么做才能坚持原来的行为?
javascript typescript nativescript nativescript-angular angular
我已经定义了一个Interface
,创建了一个数组type Interface
,现在正在尝试使用.indexOf
,一个数组的方法,但我收到了 IDE 错误投诉,这对我来说毫无意义。希望这里有人能够提出解决这个问题的想法。
export interface IAddress {
name: string,
registrationId: number
}
Run Code Online (Sandbox Code Playgroud)
let friends: IAddress[];
// assume friends has a few elements...
let index = friends.indexOf((friend: IAddress) => {
return !!(friend.name === 'some name');
});
Run Code Online (Sandbox Code Playgroud)
Argument of type '(friend: IAddress) => boolean' is not assignable to parameter of type 'IAddress'.
Type '(friend: IAddress) => boolean' is missing the following properties from type 'IAddress': registrationId
Run Code Online (Sandbox Code Playgroud)
:IAddress
如果我要从旁边的键入的 def 中删除 ,friend: …