/* * Copyright (c) 2021-2025 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. */ /** * @file * @kit ArkUI */ /*** if arkts 1.2 */ import { CommonConfiguration, CommonMethod, ContentModifier, Optional, BlurStyle, Bindable } from './common'; import { ControlSize } from './button'; import { DividerOptions } from './textPicker'; import { ResourceStr, Dimension, EdgeOutlineWidths, ResourceColor, EdgeColors, Resource, Font, Length, Offset, DividerStyleOptions } from './units'; import { SymbolGlyphModifier } from '../SymbolGlyphModifier'; import { TextModifier } from '../TextModifier'; import { OptionWidthMode } from './enums'; /*** endif */ /** * The declare of selectOption. * * @interface SelectOption * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * The declare of selectOption. * * @interface SelectOption * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * The declare of selectOption. * * @interface SelectOption * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ declare interface SelectOption { /** * Option string. * * @type { ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Option string. * * @type { ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Option string. * * @type { ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ value: ResourceStr; /** * Option icon. * * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Option icon. * * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Option icon. * * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ icon?: ResourceStr; /** * Indicates the symbol icon of this menu item. * * @type { ?SymbolGlyphModifier } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ /** * Indicates the symbol icon of this menu item. * * @type { ?SymbolGlyphModifier } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 * @arkts 1.1&1.2 */ symbolIcon?: SymbolGlyphModifier; } /** * Provides the select interface. * * @interface SelectInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Provides the select interface. * * @interface SelectInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Provides the select interface. * * @interface SelectInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ interface SelectInterface { /** * Called when the select is set. * * @param { Array } options * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Called when the select is set. * * @param { Array } options * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Called when the select is set. * * @param { Array } options * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ (options: Array): SelectAttribute; } /** * The enum for arrow position in the select * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * The enum for arrow position in the select * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ declare enum ArrowPosition { /** * The value of arrow position end * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * The value of arrow position end * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ END = 0, /** * The value of arrow position start * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * The value of arrow position start * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ START = 1 } /** * The type of alignment between select and menu. * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** * The type of alignment between select and menu. * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ declare enum MenuAlignType { /** * The value of menu align type start. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** * The value of menu align type start. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ START, /** * The value of menu align type center. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** * The value of menu align type center. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ CENTER, /** * The value of menu align type end. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** * The value of menu align type end. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ END } /** * Enumeration of avoidance modes for the Select dropdown menu * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'19','1.2':'20'} * @arkts 1.1&1.2 */ declare enum AvoidanceMode { /** * The value covers the target component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'19','1.2':'20'} * @arkts 1.1&1.2 */ COVER_TARGET, /** * This value is displayed in the maximum space.(Compress the scrollbar) * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'19','1.2':'20'} * @arkts 1.1&1.2 */ AVOID_AROUND_TARGET } /** * Callback of selecting an item from the select event. * * @typedef {function} OnSelectCallback * @param {number} index - The index of the selected item. * @param {string} selectStr - The value of the selected item. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ declare type OnSelectCallback = (index: number, selectStr: string) => void; /** * The declare of menuOutlineOptions. * * @interface MenuOutlineOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 * @arkts 1.1&1.2 */ declare interface MenuOutlineOptions { /** * the width of the menu outline. * * @type { ?(Dimension | EdgeOutlineWidths) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 * @arkts 1.1&1.2 */ width?: Dimension | EdgeOutlineWidths; /** * the color of the menu outline. * * @type { ?(ResourceColor | EdgeColors) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 * @arkts 1.1&1.2 */ color?: ResourceColor | EdgeColors; } /** * The commonMethod of select. * * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * The commonMethod of select. * * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * The commonMethod of select. * * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ declare class SelectAttribute extends CommonMethod { /** * Sets the serial number of the select item, starting from 0. * * @param { number } value * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Sets the serial number of the select item, starting from 0. * * @param { number } value * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Sets the serial number of the select item, starting from 0. * * @param { number | Resource } value - the serial number of the select item. * @returns { SelectAttribute } the attribute of the select. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ selected(value: number | Resource): SelectAttribute; /** * Sets the serial number of the select item, starting from 0. * * @param { Optional } numCount - the serial number of the select item. * @returns { SelectAttribute } the attribute of the select. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ selected(numCount: Optional): SelectAttribute; /** * Sets the text display of the select button itself. * * @param { string } value * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Sets the text display of the select button itself. * * @param { string } value * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Sets the text display of the select button itself. * * @param { ResourceStr } value - the text display of the select button itself. * @returns { SelectAttribute } the attribute of the select. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ value(value: ResourceStr): SelectAttribute; /** * Sets the text display of the select button itself. * * @param { Optional } resStr - the text display of the select button itself. * @returns { SelectAttribute } the attribute of the select. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ value(resStr: Optional): SelectAttribute; /** * Sets the text properties of the select button itself. * * @param { Font } value * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Sets the text properties of the select button itself. * * @param { Font } value * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Sets the text properties of the select button itself. * * @param { Font } value * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ font(value: Font): SelectAttribute; /** * Sets the text properties of the select button itself. * * @param { Optional } selectFont * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ font(selectFont: Optional): SelectAttribute; /** * Sets the text color of the select button itself. * * @param { ResourceColor } value * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Sets the text color of the select button itself. * * @param { ResourceColor } value * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Sets the text color of the select button itself. * * @param { ResourceColor } value * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ fontColor(value: ResourceColor): SelectAttribute; /** * Sets the text color of the select button itself. * * @param { Optional } resColor * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ fontColor(resColor: Optional): SelectAttribute; /** * Sets the background color of the selected items in the select. * * @param { ResourceColor } value * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Sets the background color of the selected items in the select. * * @param { ResourceColor } value * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Sets the background color of the selected items in the select. * * @param { ResourceColor } value * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ selectedOptionBgColor(value: ResourceColor): SelectAttribute; /** * Sets the background color of the selected items in the select. * * @param { Optional } resColor * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ selectedOptionBgColor(resColor: Optional): SelectAttribute; /** * Sets the text style of the selected items in the select. * * @param { Font } value * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Sets the text style of the selected items in the select. * * @param { Font } value * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Sets the text style of the selected items in the select. * * @param { Font } value * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ selectedOptionFont(value: Font): SelectAttribute; /** * Sets the text style of the selected items in the select. * * @param { Optional } selectFont * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ selectedOptionFont(selectFont: Optional): SelectAttribute; /** * Sets the text color of the selected item in the select. * * @param { ResourceColor } value * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Sets the text color of the selected item in the select. * * @param { ResourceColor } value * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Sets the text color of the selected item in the select. * * @param { ResourceColor } value * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ selectedOptionFontColor(value: ResourceColor): SelectAttribute; /** * Sets the text color of the selected item in the select. * * @param { Optional } resColor * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ selectedOptionFontColor(resColor: Optional): SelectAttribute; /** * Sets the background color of the select item. * * @param { ResourceColor } value * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Sets the background color of the select item. * * @param { ResourceColor } value * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Sets the background color of the select item. * * @param { ResourceColor } value * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ optionBgColor(value: ResourceColor): SelectAttribute; /** * Sets the background color of the select item. * * @param { Optional } resColor * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ optionBgColor(resColor: Optional): SelectAttribute; /** * Sets the text style for select items. * * @param { Font } value * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Sets the text style for select items. * * @param { Font } value * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Sets the text style for select items. * * @param { Font } value * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ optionFont(value: Font): SelectAttribute; /** * Sets the text style for select items. * * @param { Optional } selectFont * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ optionFont(selectFont: Optional): SelectAttribute; /** * Sets the text color for select items. * * @param { ResourceColor } value * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Sets the text color for select items. * * @param { ResourceColor } value * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Sets the text color for select items. * * @param { ResourceColor } value * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ optionFontColor(value: ResourceColor): SelectAttribute; /** * Sets the text color for select items. * * @param { Optional } resColor * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ optionFontColor(resColor: Optional): SelectAttribute; /** * Callback for selecting an item from the select. * * @param { function } callback * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Callback for selecting an item from the select. * * @param { function } callback * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Callback for selecting an item from the select. * * @param { function } callback * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ onSelect(callback: (index: number, value: string) => void): SelectAttribute; /** * Callback for selecting an item from the select. * * @param { Optional } callback * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ onSelect(callback: Optional): SelectAttribute; /** * Set the space for text and icon in select * * @param { Length } value - indicates the length of the space * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Set the space for text and icon in select * * @param { Length } value - indicates the length of the space * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ space(value: Length): SelectAttribute; /** * Set the space for text and icon in select * * @param { Optional } spaceLength - indicates the length of the space * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ space(spaceLength: Optional): SelectAttribute; /** * Set the layout direction for text and arrow in select * * @param { ArrowPosition } value - indicates the arrow position in the select * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Set the layout direction for text and arrow in select * * @param { ArrowPosition } value - indicates the arrow position in the select * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ arrowPosition(value: ArrowPosition): SelectAttribute; /** * Set the layout direction for text and arrow in select * * @param { Optional } position - indicates the arrow position in the select * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ arrowPosition(position: Optional): SelectAttribute; /** * Set the alignment between select and menu. * * @param { MenuAlignType } alignType - The type of alignment between select and menu. * @param { Offset } offset - The offset between select and menu. * @returns { SelectAttribute } the attribute of the select. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** * Set the alignment between select and menu. * * @param { MenuAlignType } alignType - The type of alignment between select and menu. * @param { Offset } offset - The offset between select and menu. * @returns { SelectAttribute } the attribute of the select. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ menuAlign(alignType: MenuAlignType, offset?: Offset): SelectAttribute; /** * Set the alignment between select and menu. * * @param { Optional } alignType - The type of alignment between select and menu. * @param { Offset } offset - The offset between select and menu. * @returns { SelectAttribute } the attribute of the select. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ menuAlign(alignType: Optional, offset?: Offset): SelectAttribute; /** * Set the width of each option and set whether the option width fit the trigger. * * @param { Dimension | OptionWidthMode } value - The length of option width and decide option width to fit trigger or content. * @returns { SelectAttribute } the attribute of the select. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** * Set the width of each option and set whether the option width fit the trigger. * * @param { Dimension | OptionWidthMode } value - The length of option width and decide option width to fit trigger or content. * @returns { SelectAttribute } the attribute of the select. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ optionWidth(value: Dimension | OptionWidthMode ): SelectAttribute; /** * Set the width of each option and set whether the option width fit the trigger. * * @param { Optional } width - The length of option width and decide option width to fit trigger or content. * @returns { SelectAttribute } the attribute of the select. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ optionWidth(width: Optional ): SelectAttribute; /** * Set the height of each option. * * @param { Dimension } value - The length of option height. * @returns { SelectAttribute } the attribute of the select. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** * Set the height of each option. * * @param { Dimension } value - The length of option height. * @returns { SelectAttribute } the attribute of the select. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ optionHeight(value: Dimension): SelectAttribute; /** * Set the height of each option. * * @param { Optional } height - The length of option height. * @returns { SelectAttribute } the attribute of the select. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ optionHeight(height: Optional): SelectAttribute; /** * set the menu's background color * * @param { ResourceColor } value - The backgroundColor of menu. * @returns { SelectAttribute } the attribute of the select. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** * set the menu's background color * * @param { ResourceColor } value - The backgroundColor of menu. * @returns { SelectAttribute } the attribute of the select. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ menuBackgroundColor(value: ResourceColor): SelectAttribute; /** * set the menu's background color * * @param { Optional } resColor - The backgroundColor of menu. * @returns { SelectAttribute } the attribute of the select. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ menuBackgroundColor(resColor: Optional): SelectAttribute; /** * set menu background blur Style * * @param { BlurStyle } value - The BackgroundBlurStyle of menu. * @returns { SelectAttribute } the attribute of the select. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** * set menu background blur Style * * @param { BlurStyle } value - The BackgroundBlurStyle of menu. * @returns { SelectAttribute } the attribute of the select. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ menuBackgroundBlurStyle(value: BlurStyle): SelectAttribute; /** * set menu background blur Style * * @param { Optional } style - The BackgroundBlurStyle of menu. * @returns { SelectAttribute } the attribute of the select. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ menuBackgroundBlurStyle(style: Optional): SelectAttribute; /** * Sets the size for controls within Select Component. * * @param { ControlSize } value - control size * @returns { SelectAttribute } the attribute of the select. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ controlSize(value: ControlSize): SelectAttribute; /** * Sets the size for controls within Select Component. * * @param { Optional } size - control size * @returns { SelectAttribute } the attribute of the select. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ controlSize(size: Optional): SelectAttribute; /** * Register a ContentModifier for each menu item. * * @param { ContentModifier } modifier - The content modifier of select menu item. * @returns { SelectAttribute } the attribute of the select. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ menuItemContentModifier(modifier: ContentModifier): SelectAttribute; /** * Register a ContentModifier for each menu item. * * @param { Optional> } modifier - The content modifier of select menu item. * @returns { SelectAttribute } the attribute of the select. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ menuItemContentModifier(modifier: Optional>): SelectAttribute; /** * Set the divider of select. * * @param { Optional | null } options Set custom and hidden divider. * @returns { SelectAttribute } the attribute of the select. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ divider(options: Optional | null): SelectAttribute; /** * Sets the attribute modifier for the text of select. * * @param { Optional } modifier Set modifier for the text of select. * @returns { SelectAttribute } the attribute of the select. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 * @arkts 1.1&1.2 */ textModifier(modifier: Optional): SelectAttribute; /** * Sets the attribute modifier for the arrow symbol of select. * * @param { Optional } modifier Set modifier for the arrow symbol of select. * @returns { SelectAttribute } the attribute of the select. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 * @arkts 1.1&1.2 */ arrowModifier(modifier: Optional): SelectAttribute; /** * Sets the attribute modifier for the text of each option. * * @param { Optional } modifier Set modifier for the text of each option. * @returns { SelectAttribute } the attribute of the select. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 * @arkts 1.1&1.2 */ optionTextModifier(modifier: Optional): SelectAttribute; /** * Sets the attribute modifier for the text of selected option. * * @param { Optional } modifier Set modifier for the text of selected option. * @returns { SelectAttribute } the attribute of the select. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 * @arkts 1.1&1.2 */ selectedOptionTextModifier(modifier: Optional): SelectAttribute; /** * Set the divider style of option * * @param { Optional } style * @returns { SelectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'19','1.2':'20'} * @arkts 1.1&1.2 */ dividerStyle(style: Optional): SelectAttribute; /** * Set the select menu avoidance mode * * @param { AvoidanceMode } mode - Enumeration value of the avoidance mode * @returns { SelectAttribute } Returns the chained object of Select component attributes * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'19','1.2':'20'} * @arkts 1.1&1.2 */ avoidance(mode: AvoidanceMode): SelectAttribute; /** * Sets the outline of menu. * * @param { MenuOutlineOptions } outline Set the outline of menu. * @returns { SelectAttribute } the attribute of the select. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 * @arkts 1.1&1.2 */ menuOutline(outline: MenuOutlineOptions): SelectAttribute; /** * Sets whether to display in the sub window. * * @param { Optional } showInSubWindow Whether to display in the sub window. * @returns { SelectAttribute } The attribute of the select. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ showInSubWindow(showInSubWindow: Optional): SelectAttribute; /** * Set whether to display the default selected icon * * @param { boolean } show - whether to display the default selected icon. * @returns { SelectAttribute } the attribute of the select. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ showDefaultSelectedIcon(show: boolean): SelectAttribute; } /** * MenuItemConfiguration used by menu item content modifier. * * @extends CommonConfiguration * @interface MenuItemConfiguration * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ declare interface MenuItemConfiguration extends CommonConfiguration{ /** * Indicates the text of this menu item. * * @type { ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ value: ResourceStr; /** * Indicates the icon of this menu item. * * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ icon?: ResourceStr; /** * Indicates the symbol icon of this menu item. * * @type { ?SymbolGlyphModifier } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ /** * Indicates the symbol icon of this menu item. * * @type { ?SymbolGlyphModifier } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 * @arkts 1.1&1.2 */ symbolIcon?: SymbolGlyphModifier; /** * Indicates whether this menu item is selected or not. * * @type { boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ selected: boolean; /** * Indicates the index of the menu item. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ index: number; /** * Select this menu item. * * @param { number } index - The value of menu item index. * @param { string } value - The value of menu item text. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ triggerSelect(index: number, value: string): void; } /** * Defines Select Component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Defines Select Component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Defines Select Component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ declare const Select: SelectInterface; /** * Defines Select Component instance. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Defines Select Component instance. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Defines Select Component instance. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ declare const SelectInstance: SelectAttribute;