feat:Input add editable and returnKeyType

This commit is contained in:
pengfei.zhou
2021-06-11 10:35:41 +08:00
committed by osborn
parent 188e3b55f6
commit ff641bf983
4 changed files with 111 additions and 1 deletions

View File

@@ -19,6 +19,15 @@ import { Gravity } from "../util/gravity";
import { BridgeContext } from "../runtime/global";
import { layoutConfig } from "../util/index.util";
export enum ReturnKeyType {
Default = 0,
Done = 1,
Search = 2,
Next = 3,
Go = 4,
Send = 5,
}
export class Input extends View {
@InconsistProperty
@@ -57,6 +66,12 @@ export class Input extends View {
@Property
password?: boolean
@Property
editable?: boolean
@Property
returnKeyType?: ReturnKeyType
getText(context: BridgeContext) {
return this.nativeChannel(context, 'getText')() as Promise<string>
}