diff --git a/api/@internal/component/ets/date_picker.d.ts b/api/@internal/component/ets/date_picker.d.ts index 160033b9515165d7a0e13b7e9ce680b1f40e6de7..04137e93b712ea4436367387382d1fe86e246579 100644 --- a/api/@internal/component/ets/date_picker.d.ts +++ b/api/@internal/component/ets/date_picker.d.ts @@ -150,6 +150,12 @@ declare class DatePickerAttribute extends CommonMethod { * @since 8 */ onChange(callback: (value: DatePickerResult) => void): DatePickerAttribute; + + /** + * Called when setting scroll sensitivity + * @since 8 + */ + scrollSensitivity(sensitivity: ScrollSensitivity | number): void; } /** diff --git a/api/@internal/component/ets/enums.d.ts b/api/@internal/component/ets/enums.d.ts index bf60ad002433926b4f6e0c48cd52646d85a7f623..46b02e87ec261cae3b7cf58000fe80b2c0188c78 100644 --- a/api/@internal/component/ets/enums.d.ts +++ b/api/@internal/component/ets/enums.d.ts @@ -1458,6 +1458,30 @@ declare enum HoverEffect { None, } +/** + * Placement enumeration description + * @since 8 + */ +declare enum ScrollSensitivity { + /** + * Fast scroll sensitivity + * @since 8 + */ + Fast, + + /** + * Fast scroll sensitivity + * @since 8 + */ + Normal, + + /** + * Fast scroll sensitivity + * @since 8 + */ + Slow, +} + /** * Placement enumeration description * @since 8 diff --git a/api/@internal/component/ets/list.d.ts b/api/@internal/component/ets/list.d.ts index b58055b330a873010a7cfe8931cfdb7149f543d9..791aa686fa4c4f8a9aecb5acf5ded6c5906f6d8f 100644 --- a/api/@internal/component/ets/list.d.ts +++ b/api/@internal/component/ets/list.d.ts @@ -116,6 +116,12 @@ declare class ListAttribute extends CommonMethod { */ multiSelectable(value: boolean): ListAttribute; + /** + * Called when setting scroll sensitivity + * @since 8 + */ + scrollSensitivity(sensitivity: ScrollSensitivity | number): void; + /** * Called when the minimum number of list item caches is set for long list deferred loading. * @since 7 diff --git a/api/@internal/component/ets/slider.d.ts b/api/@internal/component/ets/slider.d.ts index 3bcfb199915b691191e866dfb34509c66ab0863d..7846dcdd7a3993c1975546eac02fa30ae42518ea 100644 --- a/api/@internal/component/ets/slider.d.ts +++ b/api/@internal/component/ets/slider.d.ts @@ -184,6 +184,12 @@ declare class SliderAttribute extends CommonMethod { */ trackThickness(value: Length): SliderAttribute; + /** + * Called when setting scroll sensitivity + * @since 8 + */ + scrollSensitivity(sensitivity: ScrollSensitivity | number): void; + /** * Called when the selection value changes. * @devices phone, tablet, car diff --git a/api/@internal/component/ets/text_picker.d.ts b/api/@internal/component/ets/text_picker.d.ts index ce575a7a0067c06f23b243a985cb16396dc048ca..23c2367ec37ef045c5e4132f9900f1a02408dd74 100644 --- a/api/@internal/component/ets/text_picker.d.ts +++ b/api/@internal/component/ets/text_picker.d.ts @@ -86,6 +86,12 @@ declare class TextPickerAttribute extends CommonMethod { * @since 8 */ onChange(callback: (value: string, index: number) => void): TextPickerAttribute; + + /** + * Called when setting scroll sensitivity + * @since 8 + */ + scrollSensitivity(sensitivity: ScrollSensitivity | number): void; } /** diff --git a/api/config/hml/basic/picker.json b/api/config/hml/basic/picker.json index 8c85619812436597c53cc76f74bb6b3a227e53c8..e6e1a494a28333cb62b91ad7d2734ae416f41082 100644 --- a/api/config/hml/basic/picker.json +++ b/api/config/hml/basic/picker.json @@ -152,6 +152,37 @@ } ] }, + { + "name": "scrollSensitivity", + "supportedDevices": ["phone", "tablet", "tv", "wearable"], + "required": false, + "description": [ + { + "name": "DP value per degree of wheel rotation", + "supportedDevices": ["phone", "tablet", "tv", "wearable"] + } + ], + "version": [ + { + "name": "v8.0" + } + ], + "type": "enum|number", + "options": [ + { + "name": "fast", + "supportedDevices": ["phone", "tablet", "tv", "wearable"] + }, + { + "name": "normal", + "supportedDevices": ["phone", "tablet", "tv", "wearable"] + }, + { + "name": "slow", + "supportedDevices": ["phone", "tablet", "tv", "wearable"] + } + ] + }, { "name": "lunarswitch", "supportedDevices": ["phone","tablet"], diff --git a/api/config/hml/basic/slider.json b/api/config/hml/basic/slider.json index 3058687958f50308df6f6280e4e08717ddea8b5d..55a8c426c468cdc890fba0637f07f3ef6b02e827 100644 --- a/api/config/hml/basic/slider.json +++ b/api/config/hml/basic/slider.json @@ -202,6 +202,37 @@ } ] }, + { + "name": "scrollsensitivity", + "supportedDevices": ["phone", "tablet", "tv", "wearable"], + "required": false, + "version": [ + { + "name": "v8.0" + } + ], + "description": [ + { + "name": "DP value per degree of wheel rotation", + "supportedDevices": ["phone", "tablet", "tv", "wearable"] + } + ], + "type": "enum|number", + "options": [ + { + "name": "fast", + "supportedDevices": ["phone", "tablet", "tv", "wearable"] + }, + { + "name": "normal", + "supportedDevices": ["phone", "tablet", "tv", "wearable"] + }, + { + "name": "slow", + "supportedDevices": ["phone", "tablet", "tv", "wearable"] + } + ] + }, { "name": "shareid", "supportedDevices": ["phone", "tablet", "tv", "wearable"], diff --git a/api/config/hml/container/list.json b/api/config/hml/container/list.json index 78de6422e9223b5f3df66e30ed2a2805d3726015..5aa0361b44ba90e4acf09deb98baf5fe575056df 100644 --- a/api/config/hml/container/list.json +++ b/api/config/hml/container/list.json @@ -97,6 +97,37 @@ } ] }, + { + "name": "scrollsensitivity", + "supportedDevices": ["phone", "tablet", "tv", "wearable"], + "required": false, + "version": [ + { + "name": "v8.0" + } + ], + "description": [ + { + "name": "DP value per degree of wheel rotation", + "supportedDevices": ["phone", "tablet", "tv", "wearable"] + } + ], + "type": "enum|number", + "options": [ + { + "name": "fast", + "supportedDevices": ["phone", "tablet", "tv", "wearable"] + }, + { + "name": "normal", + "supportedDevices": ["phone", "tablet", "tv", "wearable"] + }, + { + "name": "slow", + "supportedDevices": ["phone", "tablet", "tv", "wearable"] + } + ] + }, { "name": "indexer", "supportedDevices": ["phone", "tablet", "tv", "wearable"],