From de1ea469a73708dea122c6280fcccd50ab86a025 Mon Sep 17 00:00:00 2001 From: jiangdayuan Date: Mon, 6 Sep 2021 12:54:04 +0800 Subject: [PATCH] jiangdayuan@huawei.com Signed-off-by: jiangdayuan --- api/@internal/component/ets/index.d.ts | 1 + api/@internal/component/ets/textPicker.d.ts | 32 +++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 api/@internal/component/ets/textPicker.d.ts diff --git a/api/@internal/component/ets/index.d.ts b/api/@internal/component/ets/index.d.ts index 68cee49975..1e1ecbcf3b 100644 --- a/api/@internal/component/ets/index.d.ts +++ b/api/@internal/component/ets/index.d.ts @@ -64,6 +64,7 @@ export * from './swiper'; export * from './tab_content'; export * from './tabs'; export * from './text'; +export * from './textPicker'; export * from './toggle'; export * from './video'; export * from './progress'; diff --git a/api/@internal/component/ets/textPicker.d.ts b/api/@internal/component/ets/textPicker.d.ts new file mode 100644 index 0000000000..2fe8e232d9 --- /dev/null +++ b/api/@internal/component/ets/textPicker.d.ts @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2021 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {CommonMethod} from "./common"; + +export declare enum PickerStyle { + INLINE = 0, + BLOCK, + FADE, +} + +interface TextPicker extends CommonMethod { + (options?: {range: string[], value?: string, selected?: number, loop?: boolean, style?: PickerStyle}): TextPicker; + defaultPickerItemHeight(value: number): TextPicker; + onAccept(callback: (value: string, index: number) => void): TextPicker; + onCancel(callback: () => void): TextPicker; + onChange(callback: (value: string, index: number) => void): TextPicker; +} + +export declare const TextPickerInterface: TextPicker; \ No newline at end of file -- Gitee