mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-10-08 07:36:38 +00:00
!9357 【ArkUI】【基础能力】支持情景化自动填充类型
Merge pull request !9357 from xinking129/TextInput_auto_fill_type_more
This commit is contained in:
commit
fe9833ee93
185
api/@internal/component/ets/text_input.d.ts
vendored
185
api/@internal/component/ets/text_input.d.ts
vendored
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021-2023 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021-2024 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -225,6 +225,178 @@ declare enum InputType {
|
||||
NUMBER_DECIMAL = 12,
|
||||
}
|
||||
|
||||
/**
|
||||
* Declare the type of input content
|
||||
*
|
||||
* @enum { number }
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @atomicservice
|
||||
* @since 12
|
||||
*/
|
||||
declare enum ContentType {
|
||||
/**
|
||||
* User name content type.
|
||||
*
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @atomicservice
|
||||
* @since 12
|
||||
*/
|
||||
USER_NAME = 0,
|
||||
|
||||
/**
|
||||
* Password content type.
|
||||
*
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @atomicservice
|
||||
* @since 12
|
||||
*/
|
||||
PASSWORD = 1,
|
||||
|
||||
/**
|
||||
* New password content type.
|
||||
*
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @atomicservice
|
||||
* @since 12
|
||||
*/
|
||||
NEW_PASSWORD = 2,
|
||||
|
||||
/**
|
||||
* Full street address content type.
|
||||
*
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @atomicservice
|
||||
* @since 12
|
||||
*/
|
||||
FULL_STREET_ADDRESS = 3,
|
||||
|
||||
/**
|
||||
* House number content type.
|
||||
*
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @atomicservice
|
||||
* @since 12
|
||||
*/
|
||||
HOUSE_NUMBER = 4,
|
||||
|
||||
/**
|
||||
* District address content type.
|
||||
*
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @atomicservice
|
||||
* @since 12
|
||||
*/
|
||||
DISTRICT_ADDRESS = 5,
|
||||
|
||||
/**
|
||||
* City address content type.
|
||||
*
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @atomicservice
|
||||
* @since 12
|
||||
*/
|
||||
CITY_ADDRESS = 6,
|
||||
|
||||
/**
|
||||
* Province address content type.
|
||||
*
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @atomicservice
|
||||
* @since 12
|
||||
*/
|
||||
PROVINCE_ADDRESS = 7,
|
||||
|
||||
/**
|
||||
* Country address content type.
|
||||
*
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @atomicservice
|
||||
* @since 12
|
||||
*/
|
||||
COUNTRY_ADDRESS = 8,
|
||||
|
||||
/**
|
||||
* Person full name content type.
|
||||
*
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @atomicservice
|
||||
* @since 12
|
||||
*/
|
||||
PERSON_FULL_NAME = 9,
|
||||
|
||||
/**
|
||||
* Person last name content type.
|
||||
*
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @atomicservice
|
||||
* @since 12
|
||||
*/
|
||||
PERSON_LAST_NAME = 10,
|
||||
|
||||
/**
|
||||
* Person first name content type.
|
||||
*
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @atomicservice
|
||||
* @since 12
|
||||
*/
|
||||
PERSON_FIRST_NAME = 11,
|
||||
|
||||
/**
|
||||
* Phone number content type.
|
||||
*
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @atomicservice
|
||||
* @since 12
|
||||
*/
|
||||
PHONE_NUMBER = 12,
|
||||
|
||||
/**
|
||||
* Phone country code content type.
|
||||
*
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @atomicservice
|
||||
* @since 12
|
||||
*/
|
||||
PHONE_COUNTRY_CODE = 13,
|
||||
|
||||
/**
|
||||
* Full phone number content type.
|
||||
*
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @atomicservice
|
||||
* @since 12
|
||||
*/
|
||||
FULL_PHONE_NUMBER = 14,
|
||||
|
||||
/**
|
||||
* Email address content type.
|
||||
*
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @atomicservice
|
||||
* @since 12
|
||||
*/
|
||||
EMAIL_ADDRESS = 15,
|
||||
|
||||
/**
|
||||
* Bank card number content type.
|
||||
*
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @atomicservice
|
||||
* @since 12
|
||||
*/
|
||||
BANK_CARD_NUMBER = 16,
|
||||
|
||||
/**
|
||||
* ID card number content type.
|
||||
*
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @atomicservice
|
||||
* @since 12
|
||||
*/
|
||||
ID_CARD_NUMBER = 17
|
||||
}
|
||||
|
||||
/**
|
||||
* Declare the type of soft keyboard.
|
||||
*
|
||||
@ -979,6 +1151,17 @@ declare class TextInputAttribute extends CommonMethod<TextInputAttribute> {
|
||||
*/
|
||||
type(value: InputType): TextInputAttribute;
|
||||
|
||||
/**
|
||||
* Called when the content type is set.
|
||||
*
|
||||
* @param { ContentType } value
|
||||
* @returns { TextInputAttribute }
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @atomicservice
|
||||
* @since 12
|
||||
*/
|
||||
contentType(value: ContentType): TextInputAttribute;
|
||||
|
||||
/**
|
||||
* Called when the color of the placeholder is set.
|
||||
*
|
||||
|
154
api/application/AutoFillType.d.ts
vendored
154
api/application/AutoFillType.d.ts
vendored
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2023-2024 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"),
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -66,5 +66,155 @@ export enum AutoFillType {
|
||||
* @StageModelOnly
|
||||
* @since 11
|
||||
*/
|
||||
NEW_PASSWORD = 3
|
||||
NEW_PASSWORD = 3,
|
||||
|
||||
/**
|
||||
* Indicates the type of full street address.
|
||||
*
|
||||
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
|
||||
* @systemapi
|
||||
* @StageModelOnly
|
||||
* @since 12
|
||||
*/
|
||||
FULL_STREET_ADDRESS = 4,
|
||||
|
||||
/**
|
||||
* Indicates the type of house number.
|
||||
*
|
||||
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
|
||||
* @systemapi
|
||||
* @StageModelOnly
|
||||
* @since 12
|
||||
*/
|
||||
HOUSE_NUMBER = 5,
|
||||
|
||||
/**
|
||||
* Indicates the type of district address.
|
||||
*
|
||||
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
|
||||
* @systemapi
|
||||
* @StageModelOnly
|
||||
* @since 12
|
||||
*/
|
||||
DISTRICT_ADDRESS = 6,
|
||||
|
||||
/**
|
||||
* Indicates the type of city address.
|
||||
*
|
||||
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
|
||||
* @systemapi
|
||||
* @StageModelOnly
|
||||
* @since 12
|
||||
*/
|
||||
CITY_ADDRESS = 7,
|
||||
|
||||
/**
|
||||
* Indicates the type of province address.
|
||||
*
|
||||
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
|
||||
* @systemapi
|
||||
* @StageModelOnly
|
||||
* @since 12
|
||||
*/
|
||||
PROVINCE_ADDRESS = 8,
|
||||
|
||||
/**
|
||||
* Indicates the type of country address.
|
||||
*
|
||||
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
|
||||
* @systemapi
|
||||
* @StageModelOnly
|
||||
* @since 12
|
||||
*/
|
||||
COUNTRY_ADDRESS = 9,
|
||||
|
||||
/**
|
||||
* Indicates the type of person full name.
|
||||
*
|
||||
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
|
||||
* @systemapi
|
||||
* @StageModelOnly
|
||||
* @since 12
|
||||
*/
|
||||
PERSON_FULL_NAME = 10,
|
||||
|
||||
/**
|
||||
* Indicates the type of person last name.
|
||||
*
|
||||
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
|
||||
* @systemapi
|
||||
* @StageModelOnly
|
||||
* @since 12
|
||||
*/
|
||||
PERSON_LAST_NAME = 11,
|
||||
|
||||
/**
|
||||
* Indicates the type of person first name.
|
||||
*
|
||||
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
|
||||
* @systemapi
|
||||
* @StageModelOnly
|
||||
* @since 12
|
||||
*/
|
||||
PERSON_FIRST_NAME = 12,
|
||||
|
||||
/**
|
||||
* Indicates the type of phone number.
|
||||
*
|
||||
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
|
||||
* @systemapi
|
||||
* @StageModelOnly
|
||||
* @since 12
|
||||
*/
|
||||
PHONE_NUMBER = 13,
|
||||
|
||||
/**
|
||||
* Indicates the type of phone country code.
|
||||
*
|
||||
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
|
||||
* @systemapi
|
||||
* @StageModelOnly
|
||||
* @since 12
|
||||
*/
|
||||
PHONE_COUNTRY_CODE = 14,
|
||||
|
||||
/**
|
||||
* Indicates the type of full phone number.
|
||||
*
|
||||
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
|
||||
* @systemapi
|
||||
* @StageModelOnly
|
||||
* @since 12
|
||||
*/
|
||||
FULL_PHONE_NUMBER = 15,
|
||||
|
||||
/**
|
||||
* Indicates the type of email address.
|
||||
*
|
||||
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
|
||||
* @systemapi
|
||||
* @StageModelOnly
|
||||
* @since 12
|
||||
*/
|
||||
EMAIL_ADDRESS = 16,
|
||||
|
||||
/**
|
||||
* Indicates the type of bank card number.
|
||||
*
|
||||
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
|
||||
* @systemapi
|
||||
* @StageModelOnly
|
||||
* @since 12
|
||||
*/
|
||||
BANK_CARD_NUMBER = 17,
|
||||
|
||||
/**
|
||||
* Indicates the type of ID card number.
|
||||
*
|
||||
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
|
||||
* @systemapi
|
||||
* @StageModelOnly
|
||||
* @since 12
|
||||
*/
|
||||
ID_CARD_NUMBER = 18
|
||||
}
|
Loading…
Reference in New Issue
Block a user