!1049 ArkUI api review 评审意见修改

Merge pull request !1049 from kukixi/master
This commit is contained in:
openharmony_ci 2022-03-14 03:02:58 +00:00 committed by Gitee
commit a356d778f3
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
35 changed files with 298 additions and 380 deletions

View File

@ -74,7 +74,6 @@ ohos_copy("ets_component") {
"api/@internal/component/ets/page_transition.d.ts",
"api/@internal/component/ets/panel.d.ts",
"api/@internal/component/ets/path.d.ts",
"api/@internal/component/ets/piece.d.ts",
"api/@internal/component/ets/polygon.d.ts",
"api/@internal/component/ets/polyline.d.ts",
"api/@internal/component/ets/progress.d.ts",
@ -91,7 +90,6 @@ ohos_copy("ets_component") {
"api/@internal/component/ets/search.d.ts",
"api/@internal/component/ets/select.d.ts",
"api/@internal/component/ets/shape.d.ts",
"api/@internal/component/ets/sheet.d.ts",
"api/@internal/component/ets/sidebar.d.ts",
"api/@internal/component/ets/slider.d.ts",
"api/@internal/component/ets/span.d.ts",
@ -108,6 +106,7 @@ ohos_copy("ets_component") {
"api/@internal/component/ets/text_input.d.ts",
"api/@internal/component/ets/text_picker.d.ts",
"api/@internal/component/ets/text_timer.d.ts",
"api/@internal/component/ets/time_picker.d.ts",
"api/@internal/component/ets/toggle.d.ts",
"api/@internal/component/ets/units.d.ts",
"api/@internal/component/ets/video.d.ts",

View File

@ -52,8 +52,9 @@ declare class AlphabetIndexerAttribute extends CommonMethod<AlphabetIndexerAttri
/**
* Index bar selection callback.
* @since 7
* @deprecated since 8
*/
onSelected(event: (index: number) => void): AlphabetIndexerAttribute;
onSelected(callback: (index: number) => void): AlphabetIndexerAttribute;
/**
* Definitions color.
@ -121,29 +122,35 @@ declare class AlphabetIndexerAttribute extends CommonMethod<AlphabetIndexerAttri
*/
alignStyle(value: IndexerAlign): AlphabetIndexerAttribute;
/**
* Index bar selection callback.
* @since 8
*/
onSelect(callback: (index: number) => void): AlphabetIndexerAttribute;
/**
* Index bar selection callback and return the strings which display on pop-up.
* @since 8
*/
onRequestPopupData(event: (index: number) => Array<string>): AlphabetIndexerAttribute;
onRequestPopupData(callback: (index: number) => Array<string>): AlphabetIndexerAttribute;
/**
* Pop-up selection callback.
* @since 8
*/
onPopupSelected(event: (index: number) => void): AlphabetIndexerAttribute;
onPopupSelect(callback: (index: number) => void): AlphabetIndexerAttribute;
/**
* Select the index.
* Sets the selected index.
* @since 8
*/
selectedIndex(index: number): AlphabetIndexerAttribute;
selected(index: number): AlphabetIndexerAttribute;
/**
* Position of the pop-up windows, relative to the midpoint of the top border of the indexer bar.
* @since 8
*/
popupPosition(value: { offsetX: number; offsetY: number }): AlphabetIndexerAttribute;
popupPosition(value: Position): AlphabetIndexerAttribute;
}
declare const AlphabetIndexer: AlphabetIndexerInterface;

View File

@ -41,7 +41,7 @@ declare enum ButtonType {
* Defines the button options.
* @since 7
*/
declare interface ButtonOption {
declare interface ButtonOptions {
/**
* Describes the button style.
* @since 7
@ -70,13 +70,13 @@ interface ButtonInterface {
* Create Button with Text child.
* @since 7
*/
(options: ButtonOption): ButtonAttribute;
(options: ButtonOptions): ButtonAttribute;
/**
* Create Button with inner text label.
* @since 7
*/
(label: ResourceStr, options?: ButtonOption): ButtonAttribute;
(label: ResourceStr, options?: ButtonOptions): ButtonAttribute;
}
/**

View File

@ -14,10 +14,10 @@
*/
/**
* Defines the option of Checkbox.
* Defines the options of Checkbox.
* @since 8
*/
declare interface CheckboxOption {
declare interface CheckboxOptions {
/**
* Current name of Checkbox.
* @since 8
@ -41,7 +41,7 @@ interface CheckboxInterface {
* Called when the Checkbox component is used.
* @since 8
*/
(options?: CheckboxOption): CheckboxAttribute;
(options?: CheckboxOptions): CheckboxAttribute;
}
/**

View File

@ -36,10 +36,10 @@ declare enum SelectStatus {
}
/**
* Defines the option of CheckboxGroup.
* Defines the options of CheckboxGroup.
* @since 8
*/
declare interface CheckboxGroupOption {
declare interface CheckboxGroupOptions {
/**
* Setting the group of CheckboxGroup.
* @since 8
@ -48,7 +48,7 @@ declare interface CheckboxGroupOption {
}
/**
* Defines the option of CheckboxGroupResult.
* Defines the options of CheckboxGroupResult.
* @since 8
*/
declare interface CheckboxGroupResult {
@ -73,7 +73,7 @@ interface CheckboxGroupInterface {
* Called when the CheckboxGroup component is used.
* @since 8
*/
(options?: CheckboxGroupOption): CheckboxGroupAttribute;
(options?: CheckboxGroupOptions): CheckboxGroupAttribute;
}
/**

View File

@ -14,10 +14,10 @@
*/
/**
* Defines circle option for Circle component.
* Defines circle options for Circle component.
* @since 7
*/
declare interface CircleOption {
declare interface CircleOptions {
/**
* Defines the width property.
* @since 7
@ -40,13 +40,13 @@ interface CircleInterface {
* use new function to set the value.
* @since 7
*/
new (value?: CircleOption): CircleAttribute;
new (value?: CircleOptions): CircleAttribute;
/**
* Set the value..
* @since 7
*/
(value?: CircleOption): CircleAttribute;
(value?: CircleOptions): CircleAttribute;
}
/**

View File

@ -194,7 +194,7 @@ declare function $rawfile(value: string): Resource;
/**
* global getContentStorage function
* @since 8
* @since 9
*/
declare function getContentStorage(value: any): ContentStorage;
@ -255,10 +255,10 @@ declare interface AnimateParam {
}
/**
* Defines the motion path option.
* Defines the motion path options.
* @since 7
*/
declare interface MotionPathOption {
declare interface MotionPathOptions {
/**
* The path info.
* @since 7
@ -285,7 +285,7 @@ declare interface MotionPathOption {
* Defines the shard transition function params.
* @since 7
*/
declare interface sharedTransitionOption {
declare interface sharedTransitionOptions {
/**
* Animation duration, in ms.
* @since 7
@ -305,7 +305,7 @@ declare interface sharedTransitionOption {
* The motion path info.
* @since 7
*/
motionPath?: MotionPathOption;
motionPath?: MotionPathOptions;
/**
* Z index info.
* @since 7
@ -319,10 +319,10 @@ declare interface sharedTransitionOption {
}
/**
* Defines the option of translate.
* Defines the options of translate.
* @since 7
*/
declare interface TranslateOption {
declare interface TranslateOptions {
/**
* The param of x direction.
* @since 7
@ -341,10 +341,10 @@ declare interface TranslateOption {
}
/**
* Defines the option of scale.
* Defines the options of scale.
* @since 7
*/
declare interface ScaleOption {
declare interface ScaleOptions {
/**
* The param of x direction.
* @since 7
@ -372,7 +372,7 @@ declare interface ScaleOption {
centerY?: number | string;
}
declare interface RotateOption {
declare interface RotateOptions {
/**
* The param of x direction.
* @since 7
@ -409,7 +409,7 @@ declare interface RotateOption {
* Defines the param of transition.
* @since 7
*/
declare interface TransitionOption {
declare interface TransitionOptions {
/**
* Defines the param of type.
* @since 7
@ -424,17 +424,17 @@ declare interface TransitionOption {
* Defines the param of translate.
* @since 7
*/
translate?: TransitionOption;
translate?: TransitionOptions;
/**
* Defines the param of scale.
* @since 7
*/
scale?: ScaleOption;
scale?: ScaleOptions;
/**
* Defines the param of rotate.
* @since 7
*/
rotate?: RotateOption;
rotate?: RotateOptions;
}
/**
@ -890,7 +890,7 @@ declare interface KeyEvent {
* Component State Styels.
* @since 8
*/
declare interface StateStyels {
declare interface StateStyles {
/**
* Defines normal state styles.
* @since 8
@ -926,7 +926,7 @@ declare interface StateStyels {
* Defines the popup options.
* @since 7
*/
declare interface PopupOption {
declare interface PopupOptions {
/**
* Information in the pop-up window.
* @since 7
@ -983,10 +983,10 @@ declare interface PopupOption {
}
/**
* Defines the custom popup option.
* Defines the custom popup options.
* @since 8
*/
declare interface CustomPopupOption {
declare interface CustomPopupOptions {
/**
* builder of popup
* @since 8
@ -1076,7 +1076,7 @@ declare class CommonMethod<T> {
/**
* Sets the touchable of the current component
* @since 8
* @since 7
*/
touchable(value: boolean): T;
@ -1135,7 +1135,7 @@ declare class CommonMethod<T> {
* width:Border width;color:Border color;radius:Border radius;
* @since 7
*/
border(value: BorderOption): T;
border(value: BorderOptions): T;
/**
* Border style
@ -1215,13 +1215,6 @@ declare class CommonMethod<T> {
*/
onBlur(event: () => void): T;
/**
* Trigger a event when focus move.
* @since 8
* @systemapi
*/
onFocusMove(event: (direction?: FocusDirection) => void): T;
/**
* animation
* @since 7
@ -1232,7 +1225,7 @@ declare class CommonMethod<T> {
* Transition parameter
* @since 7
*/
transition(value: TransitionOption): T;
transition(value: TransitionOptions): T;
/**
* Bind gesture recognition.
@ -1336,13 +1329,13 @@ declare class CommonMethod<T> {
* When this parameter is set together with slide, slide takes effect by default.
* @since 7
*/
translate(value: TranslateOption): T;
translate(value: TranslateOptions): T;
/**
* Sets the zoom effect during page transition. The value is the start point of entry and end point of exit.
* @since 7
*/
scale(value: ScaleOption): T;
scale(value: ScaleOptions): T;
/**
* Default number of occupied columns, indicating the number of occupied grid columns when the number of columns (span) of the corresponding size is not set in the useSizeType attribute.
@ -1362,7 +1355,7 @@ declare class CommonMethod<T> {
* The values are the start point during insertion and the end point during deletion.
* @since 7
*/
rotate(value: RotateOption): T;
rotate(value: RotateOptions): T;
/**
* Sets the transformation matrix for the current component.
@ -1383,7 +1376,7 @@ declare class CommonMethod<T> {
onDisAppear(event: () => void): T;
/**
* This callback is triggered when the size or position of this component has changed.
* This callback is triggered when the size or position of this component change finished.
* @param event event callback.
* @since 8
*/
@ -1435,7 +1428,7 @@ declare class CommonMethod<T> {
* If the components of the two pages are configured with the same ID, the shared element transition is performed during transition. If the parameter is set to an empty string, the shared element transition does not occur. For details about the options parameter, see the options parameter description.
* @since 7
*/
sharedTransition(id: string, options?: sharedTransitionOption): T;
sharedTransition(id: string, options?: sharedTransitionOptions): T;
/**
* Sets the sliding direction. The enumerated value supports logical AND (&) and logical OR (|).
@ -1580,7 +1573,7 @@ declare class CommonMethod<T> {
* rotatble:Whether to follow the path for rotation.
* @since 7
*/
motionPath(value: MotionPathOption): T;
motionPath(value: MotionPathOptions): T;
/**
* Add a shadow effect to the current component
@ -1630,7 +1623,7 @@ declare class CommonMethod<T> {
* Popup control
* @since 7
*/
bindPopup(show: boolean, popup: PopupOption | CustomPopupOption): T;
bindPopup(show: boolean, popup: PopupOptions | CustomPopupOptions): T;
/**
* Menu control
@ -1648,7 +1641,7 @@ declare class CommonMethod<T> {
* Sets styles for component state.
* @since 8
*/
stateStyles(value: StateStyels): T;
stateStyles(value: StateStyles): T;
/**
* id for distrubte identification.

View File

@ -15,10 +15,10 @@
/**
* Defines the option of CustomDialogController.
* Defines the options of CustomDialogController.
* @since 7
*/
declare interface CustomDialogControllerOption {
declare interface CustomDialogControllerOptions {
/**
* Custom builder function.
* @since 7
@ -71,7 +71,7 @@ declare class CustomDialogController {
* The constructor transfers parameter settings.
* @since 7
*/
constructor(value: CustomDialogControllerOption);
constructor(value: CustomDialogControllerOptions);
/**
* Display the content of the customized pop-up window. If the content has been displayed, it does not take effect.

View File

@ -33,10 +33,10 @@ declare enum DataPanelType {
}
/**
* Defines the option of DataPanel.
* Defines the options of DataPanel.
* @since 7
*/
declare interface DataPanelOption {
declare interface DataPanelOptions {
/**
* Current data value. the max length is 9.
* @since 7
@ -65,7 +65,7 @@ interface DataPanelInterface {
* Return a DataPanel.
* @since 7
*/
(options: DataPanelOption): DataPanelAttribute;
(options: DataPanelOptions): DataPanelAttribute;
}
/**

View File

@ -13,24 +13,6 @@
* limitations under the License.
*/
/**
* Defines the type of DatePicker.
* @since 8
*/
declare enum DatePickerType {
/**
* Application hour and second
* @since 8
*/
Time,
/**
* Application data
* @since 8
*/
Date,
}
/**
* Defines the struct of DatePickerResult.
* @since 8
@ -53,31 +35,13 @@ declare interface DatePickerResult {
* @since 8
*/
day?: number;
/**
* Application hour
* @since 8
*/
hour?: number;
/**
* Application minute
* @since 8
*/
minute?: number;
/**
* Application second
* @since 8
*/
second?: number;
}
/**
* Defines the option of DatePicker.
* Defines the options of DatePicker.
* @since 8
*/
declare interface DatePickerOption {
declare interface DatePickerOptions {
/**
* Specifies the start date of the date selector.
* @since 8
@ -94,12 +58,6 @@ declare interface DatePickerOption {
* @since 8
*/
selected?: Date;
/**
* Selector type, including date selector and time selector. By default, the date selector is used.
* @since 8
*/
type?: DatePickerType;
}
/**
@ -111,7 +69,7 @@ interface DatePickerInterface {
* Defines the DatePicker constructor.
* @since 8
*/
(options?: DatePickerOption): DatePickerAttribute;
(options?: DatePickerOptions): DatePickerAttribute;
}
/**
@ -125,12 +83,6 @@ declare class DatePickerAttribute extends CommonMethod<DatePickerAttribute> {
*/
lunar(value: boolean): DatePickerAttribute;
/**
* Time Selector: indicates whether to display the 24-hour clock.
* @since 8
*/
useMilitaryTime(value: boolean): DatePickerAttribute;
/**
* This event is triggered when a DatePicker date or time is selected.
* @since 8
@ -139,20 +91,16 @@ declare class DatePickerAttribute extends CommonMethod<DatePickerAttribute> {
}
/**
* Defines the DatePickerDialogOption for Data Picker Dialog.
* Defines the DatePickerDialogOptions for Data Picker Dialog.
* @since 8
*/
declare interface DatePickerDialogOption extends DatePickerOption {
declare interface DatePickerDialogOptions extends DatePickerOptions {
/**
* Date selector: true: displays the lunar calendar. false: The lunar calendar is not displayed.
* @since 8
*/
lunar?: boolean;
/**
* Time Selector: indicates whether to display the 24-hour clock.
* @since 8
*/
useMilitaryTime?: boolean;
/**
* Called when the OK button in the dialog is clicked.
* @since 8
@ -179,7 +127,7 @@ declare class DatePickerDialog {
* Invoking method display.
* @since 8
*/
static show(options?: DatePickerDialogOption);
static show(options?: DatePickerDialogOptions);
}
declare const DatePicker: DatePickerInterface;

View File

@ -274,13 +274,7 @@ declare enum MouseAction {
* Triggered when the mouse is Hovered.
* @since 8
*/
Hover,
/**
* Triggered when the mouse status is None.
* @since 8
*/
None,
Hover
}
/**
@ -613,42 +607,6 @@ declare enum Direction {
Auto,
}
/**
* Sets the horizontal layout of elements.
* @since 8
*/
declare enum FocusDirection {
/**
* From the key up.
* @since 8
*/
Up,
/**
* From the key down.
* @since 8
*/
Down,
/**
* From the key left.
* @since 8
*/
Left,
/**
* From the key right.
* @since 8
*/
Right,
/**
* From the key tab.
* @since 8
*/
Tab,
}
/**
* Used to set the status of the scroll bar.
* @since 7
@ -1395,7 +1353,7 @@ declare enum HoverEffect {
* Highlight effect
* @since 8
*/
Board,
Highlight,
/**
* None effect

View File

@ -14,10 +14,10 @@
*/
/**
* Defines the option of Flex.
* Defines the options of Flex.
* @since 7
*/
declare interface FlexOption {
declare interface FlexOptions {
/**
* Sets the horizontal layout of elements.
* @since 7
@ -58,7 +58,7 @@ interface FlexInterface {
* Defines the constructor of Flex.
* @since 7
*/
(value?: FlexOption): FlexAttribute;
(value?: FlexOptions): FlexAttribute;
}
/**

View File

@ -317,10 +317,10 @@ interface LongPressGestureInterface {
}
/**
* Defines the PanGesture option.
* Defines the PanGesture options.
* @since 7
*/
declare class PanGestureOption {
declare class PanGestureOptions {
/**
* Constructor parameters.
* @since 7
@ -355,7 +355,7 @@ interface PanGestureInterface {
* Set the value.
* @since 7
*/
(value?: { fingers?: number; direction?: PanDirection; distance?: number } | PanGestureOption): PanGestureInterface;
(value?: { fingers?: number; direction?: PanDirection; distance?: number } | PanGestureOptions): PanGestureInterface;
/**
* Pan gesture recognition success callback.

View File

@ -50,10 +50,10 @@ declare enum SizeType {
}
/**
* Defines the option of GridContainer.
* Defines the options of GridContainer.
* @since 7
*/
declare interface GridContainerOption {
declare interface GridContainerOptions {
/**
* Sets the total number of columns in the current layout.
* @since 7
@ -88,7 +88,7 @@ interface GridContainerInterface {
* Defines the constructor of GridContainer.
* @since 7
*/
(value?: GridContainerOption): GridContainerAttribute;
(value?: GridContainerOptions): GridContainerAttribute;
}
/**

View File

@ -58,7 +58,6 @@
/// <reference path="./panel.d.ts" />
/// <reference path="./path.d.ts" />
/// <reference path="./pattern_lock.d.ts" />
/// <reference path="./piece.d.ts" />
/// <reference path="./plugin_component.d.ts" />
/// <reference path="./polygon.d.ts" />
/// <reference path="./polyline.d.ts" />
@ -76,7 +75,6 @@
/// <reference path="./search.d.ts" />
/// <reference path="./select.d.ts" />
/// <reference path="./shape.d.ts" />
/// <reference path="./sheet.d.ts" />
/// <reference path="./slider.d.ts" />
/// <reference path="./span.d.ts" />
/// <reference path="./stack.d.ts" />
@ -92,6 +90,7 @@
/// <reference path="./text_input.d.ts" />
/// <reference path="./text_picker.d.ts" />
/// <reference path="./text_timer.d.ts" />
/// <reference path="./time_picker.d.ts" />
/// <reference path="./toggle.d.ts" />
/// <reference path="./units.d.ts" />
/// <reference path="./video.d.ts" />

View File

@ -27,53 +27,81 @@ declare interface DataChangeListener {
/**
* Data added.
* @since 7
* @deprecated since 8
*/
onDataAdded(index: number): void;
/**
* Data added.
* @since 8
*/
onDataAdd(index: number): void;
/**
* Data moved.
* @since 7
* @deprecated since 8
*/
onDataMoved(from: number, to: number): void;
/**
* Data moved.
* @since 8
*/
onDataMove(from: number, to: number): void;
/**
* Data deleted.
* @since 7
* @deprecated since 8
*/
onDataDeleted(index: number): void;
/**
* Data changed.
* Data deleted.
* @since 8
*/
onDataDelete(index: number): void;
/**
* Call when has data change.
* @since 7
* @deprecated since 8
*/
onDataChanged(index: number): void;
/**
* Call when has data change.
* @since 8
*/
onDataChange(index: number): void;
}
/**
* Data changed.
* Developers need to implement this interface to provide data to LazyForEach component.
* @since 7
*/
declare interface IDataSource {
/**
* Total count.
* Total data count.
* @since 7
*/
totalCount(): number;
/**
* get data.
* Return the data of index.
* @since 7
*/
getData(index: number): any;
/**
* register Data Change Listener
* Register data change listener.
* @since 7
*/
registerDataChangeListener(listener: DataChangeListener): void;
/**
* unregister Data Change Listener
* Unregister data change listener.
* @since 7
*/
unregisterDataChangeListener(listener: DataChangeListener): void;

View File

@ -106,7 +106,7 @@ declare class ListAttribute extends CommonMethod<ListAttribute> {
/**
* Called when setting whether to enable chain linkage dynamic effect.
* @since 8
* @since 7
*/
chainAnimation(value: boolean): ListAttribute;

View File

@ -132,14 +132,14 @@ declare class TSButtonAttribute extends CommonMethod<ButtonAttribute> {
* @systemapi
* @since 8
*/
createWithChild(label?: ResourceStr, options?: ButtonOption): ButtonAttribute;
createWithChild(label?: ResourceStr, options?: ButtonOptions): ButtonAttribute;
/**
* Used for TS compiler.
* @ignore
* @systemapi
* @since 8
*/
createWithLabel(label?: ResourceStr, options?: ButtonOption): ButtonAttribute;
createWithLabel(label?: ResourceStr, options?: ButtonOptions): ButtonAttribute;
/**
* Used for TS compiler.
* @ignore
@ -239,7 +239,7 @@ declare class TSCheckboxAttribute extends CommonMethod<CheckboxAttribute> {
* @systemapi
* @since 8
*/
create(options?: CheckboxOption): CheckboxAttribute;
create(options?: CheckboxOptions): CheckboxAttribute;
/**
* Used for TS compiler.
* @ignore
@ -269,7 +269,7 @@ declare class TSCheckboxGroupAttribute extends CommonMethod<CheckboxGroupAttribu
* @systemapi
* @since 8
*/
create(options?: CheckboxGroupOption): CheckboxGroupAttribute;
create(options?: CheckboxGroupOptions): CheckboxGroupAttribute;
/**
* Used for TS compiler.
* @ignore
@ -299,7 +299,7 @@ declare class TSCircleAttribute extends CommonShapeMethod<CircleAttribute> {
* @systemapi
* @since 8
*/
create(value?: CircleOption): CircleAttribute;
create(value?: CircleOptions): CircleAttribute;
/**
* Used for TS compiler.
* @ignore
@ -412,7 +412,7 @@ declare class TSDataPanelAttribute extends CommonMethod<DataPanelAttribute> {
* @systemapi
* @since 8
*/
create(options: DataPanelOption): DataPanelAttribute;
create(options: DataPanelOptions): DataPanelAttribute;
/**
* Used for TS compiler.
* @ignore
@ -442,7 +442,7 @@ declare class TSDatePickerAttribute extends CommonMethod<DatePickerAttribute> {
* @systemapi
* @since 8
*/
create(options?: DatePickerOption): DatePickerAttribute;
create(options?: DatePickerOptions): DatePickerAttribute;
/**
* Used for TS compiler.
* @ignore
@ -518,7 +518,7 @@ declare class TSFlexAttribute extends CommonMethod<FlexAttribute> {
* @systemapi
* @since 8
*/
create(value?: FlexOption): FlexAttribute;
create(value?: FlexOptions): FlexAttribute;
/**
* Used for TS compiler.
* @ignore
@ -696,7 +696,7 @@ declare class TSGridContainerAttribute extends ColumnAttribute {
* @systemapi
* @since 8
*/
create(value?: GridContainerOption): GridContainerAttribute;
create(value?: GridContainerOptions): GridContainerAttribute;
/**
* Used for TS compiler.
* @ignore
@ -1300,7 +1300,7 @@ declare class TSRadioAttribute extends CommonMethod<RadioAttribute> {
* @systemapi
* @since 8
*/
create(options: RadioOption): RadioAttribute;
create(options: RadioOptions): RadioAttribute;
/**
* Used for TS compiler.
* @ignore
@ -1509,7 +1509,7 @@ declare class TSScrollBarAttribute extends CommonMethod<ScrollBarAttribute> {
* @systemapi
* @since 8
*/
create(value: ScrollBarOption): ScrollBarAttribute;
create(value: ScrollBarOptions): ScrollBarAttribute;
/**
* Used for TS compiler.
* @ignore
@ -1574,7 +1574,7 @@ declare class TSSelectAttribute extends CommonMethod<SelectAttribute> {
* @systemapi
* @since 8
*/
create(options: Array<SelectOption>): SelectAttribute;
create(options: Array<SelectOptions>): SelectAttribute;
/**
* Used for TS compiler.
* @ignore
@ -1664,7 +1664,7 @@ declare class TSSliderAttribute extends CommonMethod<SliderAttribute> {
* @systemapi
* @since 8
*/
create(options?: SliderOption): SliderAttribute;
create(options?: SliderOptions): SliderAttribute;
/**
* Used for TS compiler.
* @ignore
@ -1920,7 +1920,7 @@ declare class TSTextAreaAttribute extends CommonMethod<TextAreaAttribute> {
* @systemapi
* @since 8
*/
create(value?: TextAreaOption): TextAreaAttribute;
create(value?: TextAreaOptions): TextAreaAttribute;
/**
* Used for TS compiler.
* @ignore
@ -1973,7 +1973,7 @@ declare class TSTextInputAttribute extends CommonMethod<TextInputAttribute> {
* @systemapi
* @since 8
*/
create(value?: TextInputOption): TextInputAttribute;
create(value?: TextInputOptions): TextInputAttribute;
/**
* Used for TS compiler.
* @ignore
@ -1996,7 +1996,7 @@ declare class TSTextPickerAttribute extends CommonMethod<TextPickerAttribute> {
* @systemapi
* @since 8
*/
create(options?: TextPickerOption): TextPickerAttribute;
create(options?: TextPickerOptions): TextPickerAttribute;
/**
* Used for TS compiler.
* @ignore
@ -2026,7 +2026,7 @@ declare class TSTextTimerAttribute extends CommonMethod<TextTimerAttribute> {
* @systemapi
* @since 8
*/
create(options?: TextTimerOption): TextTimerAttribute;
create(options?: TextTimerOptions): TextTimerAttribute;
/**
* Used for TS compiler.
* @ignore
@ -2247,7 +2247,7 @@ declare class TSPanGestureInterface {
direction?: PanDirection;
distance?: number;
}
| PanGestureOption,
| PanGestureOptions,
): PanGestureInterface;
/**
* Used for TS compiler.

View File

@ -108,12 +108,6 @@ declare class NavigationAttribute extends CommonMethod<NavigationAttribute> {
*/
menus(value: Array<NavigationMenuItem> | CustomBuilder): NavigationAttribute;
/**
* The amount of the menu in Navigation.
* @since 8
*/
menuCount(value: number): NavigationAttribute;
/**
* Tool bar
* @since 8
@ -127,10 +121,10 @@ declare class NavigationAttribute extends CommonMethod<NavigationAttribute> {
hideToolBar(value: boolean): NavigationAttribute;
/**
* Trigger a titleModeChanged event when title mode changed at free mode.
* Trigger callback when title mode change finished at free mode.
* @since 8
*/
onTitleModeChanged(callback: (titleMode: NavigationTitleMode) => void): NavigationAttribute;
onTitleModeChange(callback: (titleMode: NavigationTitleMode) => void): NavigationAttribute;
}
declare const Navigation: NavigationInterface;

View File

@ -1,95 +0,0 @@
/*
* 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.
*/
/**
* Sets the relative position of icons and text.
* @since 8
*/
declare enum IconPosition {
/**
* The icon is at the beginning of the text.
* @since 8
*/
Start,
/**
* The icon is at the end of the text.
* @since 8
*/
End,
}
/**
* Provides text and icons for setting block entries.
* @since 8
*/
interface PieceInterface {
/**
* Called when setting the position of a block entry.
* @since 8
*/
(options?: { content: string; icon?: string }): PieceAttribute;
}
/**
* @since 8
*/
declare class PieceAttribute extends CommonMethod<PieceAttribute> {
/**
* Called when the relative position of the icon and the text is set.
* @since 8
*/
iconPosition(value: IconPosition): PieceAttribute;
/**
* Called when the value of Piece fontColor is set
* @since 8
*/
fontColor(value: ResourceColor): PieceAttribute;
/**
* Called when the value of Piece fontSize is set
* @since 8
*/
fontSize(value: Length): PieceAttribute;
/**
* Called when the value of Piece fontStyle is set
* @since 8
*/
fontStyle(value: FontStyle): PieceAttribute;
/**
* Called when the value of Piece fontWeight is set
* @since 8
*/
fontWeight(value: number | FontWeight | string): PieceAttribute;
/**
* Called when the value of Piece fontFamily is set
* @since 8
*/
fontFamily(value: ResourceStr): PieceAttribute;
/**
* Called when the value of Piece showDelete is set
* @since 8
*/
showDelete(value: boolean): PieceAttribute;
/**
* Default icon is invisible,
* Callback onClose function when icon is clicked
* @since 8
*/
onClose(callback: () => void): PieceAttribute;
}
declare const Piece: PieceInterface;
declare const PieceInstance: PieceAttribute;

View File

@ -14,10 +14,10 @@
*/
/**
* Defines style option for progress component.
* Defines style options for progress component.
* @since 8
*/
declare interface ProgressStyleOption {
declare interface ProgressStyleOptions {
/**
* Defines the strokeWidth property.
* @since 8
@ -106,7 +106,7 @@ declare class ProgressAttribute extends CommonMethod<ProgressAttribute> {
* Called when the style of progress bar is set.
* @since 8
*/
style(value: ProgressStyleOption): ProgressAttribute;
style(value: ProgressStyleOptions): ProgressAttribute;
}
declare const Progress: ProgressInterface;

View File

@ -17,7 +17,7 @@
* Input parameter for creating a radio box.
* @since 8
*/
declare interface RadioOption {
declare interface RadioOptions {
/**
* Radio group name.
* @since 8
@ -40,7 +40,7 @@ interface RadioInterface {
* Called when a radio box is created.
* @since 8
*/
(options: RadioOption): RadioAttribute;
(options: RadioOptions): RadioAttribute;
}
/**

View File

@ -32,10 +32,10 @@ declare enum ScrollBarDirection {
}
/**
* Defines the option of ScrollBar.
* Defines the options of ScrollBar.
* @since 8
*/
declare interface ScrollBarOption {
declare interface ScrollBarOptions {
/**
* Sets the scroller of scroll bar.
* @since 8
@ -64,7 +64,7 @@ interface ScrollBarInterface {
* Called when a ScrollBar container is set.
* @since 8
*/
(value: ScrollBarOption): ScrollBarAttribute;
(value: ScrollBarOptions): ScrollBarAttribute;
}
/**

View File

@ -112,7 +112,7 @@ declare class SelectAttribute extends CommonMethod<SelectAttribute> {
* Callback for selecting an item from the select.
* @since 8
*/
onSelected(event: (index: number, value?: string) => void): SelectAttribute;
onSelect(callback: (index: number, value?: string) => void): SelectAttribute;
}
declare const Select: SelectInterface;

View File

@ -1,35 +0,0 @@
/*
* 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.
*/
/**
* Provides the interface for the sheet attributes.
* @since 8
*/
interface SheetInterface {
/**
* Create sheet.
* @since 8
*/
(): SheetAttribute;
}
/**
* Declares sheet properties.
* @since 8
*/
declare class SheetAttribute extends CommonMethod<SheetAttribute> {}
declare const Sheet: SheetInterface;
declare const SheetInstance: SheetAttribute;

View File

@ -101,7 +101,7 @@ declare class SideBarContainerAttribute extends CommonMethod<SideBarContainerAtt
*/
showControlButton(value: boolean): SideBarContainerAttribute;
/**
* Callback onChange function when sidebar style of showing has changed
* Trigger callback when sidebar style of showing change finished.
* @since 8
*/
onChange(callback: (value: boolean) => void): SideBarContainerAttribute;

View File

@ -62,10 +62,10 @@ declare enum SliderChangeMode {
}
/**
* Defines the option of Slider.
* Defines the options of Slider.
* @since 7
*/
declare interface SliderOption {
declare interface SliderOptions {
/**
* Current value of Slider.
* @since 7
@ -118,7 +118,7 @@ interface SliderInterface {
* Called when the slider bar component is used.
* @since 7
*/
(options?: SliderOption): SliderAttribute;
(options?: SliderOptions): SliderAttribute;
}
/**

View File

@ -38,7 +38,7 @@ declare class SwiperController {
/**
* Called when need to stop the swiper animation.
* @since 8
* @since 7
*/
finishAnimation(callback?: () => void);
}

View File

@ -31,10 +31,10 @@ declare class TextAreaController {
}
/**
* Defines the option of TextArea.
* Defines the options of TextArea.
* @since 7
*/
declare interface TextAreaOption {
declare interface TextAreaOptions {
/**
* The place holder text string.
* @since 7
@ -63,7 +63,7 @@ interface TextAreaInterface {
* Called when writing multiple lines of text.
* @since 7
*/
(value?: TextAreaOption): TextAreaAttribute;
(value?: TextAreaOptions): TextAreaAttribute;
}
/**

View File

@ -97,10 +97,10 @@ declare class TextInputController {
}
/**
* Defines the option of TextInput.
* Defines the options of TextInput.
* @since 7
*/
declare interface TextInputOption {
declare interface TextInputOptions {
/**
* The place holder text string.
* @since 7
@ -129,7 +129,7 @@ interface TextInputInterface {
* Called when writing a single line of text.
* @since 7
*/
(value?: TextInputOption): TextInputAttribute;
(value?: TextInputOptions): TextInputAttribute;
}
/**
@ -168,11 +168,18 @@ declare class TextInputAttribute extends CommonMethod<TextInputAttribute> {
caretColor(value: ResourceColor): TextInputAttribute;
/**
* Called when judging whether the text editing has changed.
* Called when judging whether the text editing change finished.
* @since 7
* @deprecated since 8
*/
onEditChanged(callback: (isEditing: boolean) => void): TextInputAttribute;
/**
* Called when judging whether the text editing change finished.
* @since 8
*/
onEditChange(callback: (isEditing: boolean) => void): TextInputAttribute;
/**
* Called when submitted.
* @since 7

View File

@ -14,10 +14,10 @@
*/
/**
* Defines the option of TextPicker.
* Defines the options of TextPicker.
* @since 8
*/
declare interface TextPickerOption {
declare interface TextPickerOptions {
/**
* Specifies the range of the text selector.
*/
@ -40,7 +40,7 @@ interface TextPickerInterface {
* Defines the TextPicker constructor.
* @since 8
*/
(options?: TextPickerOption): TextPickerAttribute;
(options?: TextPickerOptions): TextPickerAttribute;
}
/**
@ -88,10 +88,10 @@ declare interface TextPickerResult {
}
/**
* Defines the TextPickerDialogOption for Text Picker Dialog.
* Defines the TextPickerDialogOptions for Text Picker Dialog.
* @since 8
*/
declare interface TextPickerDialogOption extends TextPickerOption {
declare interface TextPickerDialogOptions extends TextPickerOptions {
/**
* Called when the default height of the selected element is set.
* @since 8
@ -123,7 +123,7 @@ declare class TextPickerDialog {
* Invoking method display.
* @since 8
*/
static show(options?: TextPickerDialogOption);
static show(options?: TextPickerDialogOptions);
}
declare const TextPicker: TextPickerInterface;

View File

@ -44,10 +44,10 @@ declare class TextTimerController {
}
/**
* Defines the option of TextTimer.
* Defines the options of TextTimer.
* @since 8
*/
interface TextTimerOption {
interface TextTimerOptions {
/**
* Sets whether to countdown.The default value is false.
* @since 8
@ -77,7 +77,7 @@ interface TextTimerInterface {
* Defines the TextTimer constructor.
* @since 8
*/
(options?: TextTimerOption): TextTimerAttribute;
(options?: TextTimerOptions): TextTimerAttribute;
}
/**

View File

@ -0,0 +1,115 @@
/*
* 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.
*/
/**
* Defines the struct of TimePickerResult.
* @since 8
*/
declare interface TimePickerResult {
/**
* Application hour
* @since 8
*/
hour?: number;
/**
* Application minute
* @since 8
*/
minute?: number;
}
/**
* Defines the options of TimePicker.
* @since 8
*/
declare interface TimePickerOptions {
/**
* Specifies the time selector check time.
*/
selected?: Date;
}
/**
* Defines the TimePicker Component.
* @since 8
*/
interface TimePickerInterface {
/**
* Defines the TimePicker constructor.
* @since 8
*/
(options?: TimePickerOptions): TimePickerAttribute;
}
/**
* Defines the TimePicker attribute functions.
* @since 8
*/
declare class TimePickerAttribute extends CommonMethod<TimePickerAttribute> {
/**
* Time Selector: indicates whether to display the 24-hour clock.
* @since 8
*/
useMilitaryTime(value: boolean): TimePickerAttribute;
/**
* This event is triggered when a TimePicker time is selected.
* @since 8
*/
onChange(callback: (value: TimePickerResult) => void): TimePickerAttribute;
}
/**
* Defines the TimePickerDialogOptions for Data Picker Dialog.
* @since 8
*/
declare interface TimePickerDialogOptions extends TimePickerOptions {
/**
* Time Selector: indicates whether to display the 24-hour clock.
* @since 8
*/
useMilitaryTime?: boolean;
/**
* Called when the OK button in the dialog is clicked.
* @since 8
*/
onAccept?: (value: TimePickerResult) => void;
/**
* Called when the Cancel button in the dialog is clicked.
* @since 8
*/
onCancel?: () => void;
/**
* This event is triggered when a TimePicker Time or time is selected in dialog.
* @since 8
*/
onChange?: (value: TimePickerResult) => void;
}
/**
* Defines TimePickerDialog which uses show method to show TimePicker dialog.
* @since 8
*/
declare class TimePickerDialog {
/**
* Invoking method display.
* @since 8
*/
static show(options?: TimePickerDialogOptions);
}
declare const TimePicker: TimePickerInterface;
declare const TimePickerInstance: TimePickerAttribute;

View File

@ -150,13 +150,13 @@ declare interface Area {
* Defines the local position.
* @since 8
*/
pos: Position;
position: Position;
/**
* Defines the global position.
* @since 8
*/
globalPos: Position;
globalPosition: Position;
}
/**
@ -177,7 +177,7 @@ declare interface Position {
}
/**
* Defines the constrain size option.
* Defines the constrain size options.
* @since 7
*/
declare interface ConstraintSizeOptions {
@ -204,7 +204,7 @@ declare interface ConstraintSizeOptions {
}
/**
* Defines the size option.
* Defines the size options.
* @since 7
*/
declare interface SizeOptions {
@ -221,10 +221,10 @@ declare interface SizeOptions {
}
/**
* Defines the option of border.
* Defines the options of border.
* @since 7
*/
declare interface BorderOption {
declare interface BorderOptions {
/**
* Defines the border width.
* @since 7

View File

@ -83,7 +83,7 @@ declare enum PlaybackSpeed {
* Defines the video options.
* @since 7
*/
declare interface VideoOption {
declare interface VideoOptions {
/**
* src of video.
* @since 7
@ -134,7 +134,7 @@ declare class VideoController {
/**
* Provides an event to stop playback.
* @since 6
* @since 7
*/
stop();
@ -160,7 +160,7 @@ interface VideoInterface {
* Set the value.
* @since 7
*/
(value: VideoOption): VideoAttribute;
(value: VideoOptions): VideoAttribute;
}
/**