未验证 提交 46e943f5 编写于 作者: O openharmony_ci 提交者: Gitee

!4515 MR接口修改+示例代码修改

Merge pull request !4515 from LiAn/OpenHarmony-3.1-Release
...@@ -180,11 +180,11 @@ export default { ...@@ -180,11 +180,11 @@ export default {
## AxisType ## AxisType
轴类型,本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持 输入设备的轴类型,为'Null'
## AxisRange ## AxisRange
输入设备的轴信息 输入设备的轴信息
**系统能力:** 以下各项对应的系统能力均为SystemCapability.MultimodalInput.Input.InputDevice **系统能力:** 以下各项对应的系统能力均为SystemCapability.MultimodalInput.Input.InputDevice
...@@ -199,7 +199,7 @@ export default { ...@@ -199,7 +199,7 @@ export default {
## SourceType ## SourceType
定义这个轴的输入源类型。比如鼠标设备可上报x轴事件,则x轴的源就是鼠标。 定义轴的输入源类型。比如鼠标设备可上报x轴事件,则x轴的源就是鼠标。
**系统能力:** 以下各项对应的系统能力均为SystemCapability.MultimodalInput.Input.InputDevice **系统能力:** 以下各项对应的系统能力均为SystemCapability.MultimodalInput.Input.InputDevice
......
...@@ -287,7 +287,6 @@ getHitTest(): HitTestType ...@@ -287,7 +287,6 @@ getHitTest(): HitTestType
| HttpAnchorImg | 带有超链接的图片,其中超链接的src为http。 | | HttpAnchorImg | 带有超链接的图片,其中超链接的src为http。 |
| Img | HTML::img标签。 | | Img | HTML::img标签。 |
| Map | 地理地址。 | | Map | 地理地址。 |
| Phone | 电话号码。 |
| Unknown | 未知内容。 | | Unknown | 未知内容。 |
### loadData ### loadData
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
| 名称 | 参数类型 | 必填 | 描述 | | 名称 | 参数类型 | 必填 | 描述 |
| ----------- | --------------------------------------------- | ---- | ------------------------------------------------------------ | | ----------- | --------------------------------------------- | ---- | ------------------------------------------------------------ |
| id | string | 是 | 组件的唯一标识,支持最大的字符串长度128。 | | id | string | 是 | 组件的唯一标识,支持最大的字符串长度128。 |
| type | string | 是 | 用于指定XComponent组件类型,可选值为:<br/>-surface:组件内容单独送显,直接合成到屏幕。<br/>-component:组件内容与其他组件合成后统一送显。<br/>component类型在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。 | | type | string | 是 | 用于指定XComponent组件类型,可选值为:<br/>-surface:组件内容单独送显,直接合成到屏幕。<br/>-component:组件内容与其他组件合成后统一送显。|
| libraryname | string | 否 | 应用Native层编译输出动态库名称。 | | libraryname | string | 否 | 应用Native层编译输出动态库名称。 |
| controller | [XComponentController](#XComponentController) | 否 | 给组件绑定一个控制器,通过控制器调用组件方法。 | | controller | [XComponentController](#XComponentController) | 否 | 给组件绑定一个控制器,通过控制器调用组件方法。 |
......
...@@ -79,7 +79,7 @@ struct GestureSettingsExample { ...@@ -79,7 +79,7 @@ struct GestureSettingsExample {
TapGesture() TapGesture()
.onAction((event: GestureEvent) => { .onAction((event: GestureEvent) => {
this.value = 'priorityGesture onAction' + '\ncomponent globalPos:(' this.value = 'priorityGesture onAction' + '\ncomponent globalPos:('
+ event.target.area.globalPos.x + ',' + event.target.area.globalPos.y + ')\nwidth:' + event.target.area.globalPosition.x + ',' + event.target.area.globalPosition.y + ')\nwidth:'
+ event.target.area.width + '\nheight:' + event.target.area.height + event.target.area.width + '\nheight:' + event.target.area.height
}), GestureMask.IgnoreInternal }), GestureMask.IgnoreInternal
) )
......
...@@ -59,7 +59,7 @@ struct ClickExample { ...@@ -59,7 +59,7 @@ struct ClickExample {
.onClick((event: ClickEvent) => { .onClick((event: ClickEvent) => {
console.info(this.text = 'Click Point:' + '\n screenX:' + event.screenX + '\n screenY:' + event.screenY console.info(this.text = 'Click Point:' + '\n screenX:' + event.screenX + '\n screenY:' + event.screenY
+ '\n x:' + event.x + '\n y:' + event.y + '\ntarget:' + '\n component globalPos:(' + '\n x:' + event.x + '\n y:' + event.y + '\ntarget:' + '\n component globalPos:('
+ event.target.area.globalPos.x + ',' + event.target.area.globalPos.y + ')\n width:' + event.target.area.globalPosition.x + ',' + event.target.area.globalPosition.y + ')\n width:'
+ event.target.area.width + '\n height:' + event.target.area.height) + event.target.area.width + '\n height:' + event.target.area.height)
}) })
Text(this.text).padding(15) Text(this.text).padding(15)
......
...@@ -78,7 +78,7 @@ struct TouchExample { ...@@ -78,7 +78,7 @@ struct TouchExample {
} }
console.info(this.text = 'TouchType:' + this.eventType + '\nDistance between touch point and touch element:\nx: ' console.info(this.text = 'TouchType:' + this.eventType + '\nDistance between touch point and touch element:\nx: '
+ event.touches[0].x + '\n' + 'y: ' + event.touches[0].y + '\ncomponent globalPos:(' + event.touches[0].x + '\n' + 'y: ' + event.touches[0].y + '\ncomponent globalPos:('
+ event.target.area.globalPos.x + ',' + event.target.area.globalPos.y + ')\nwidth:' + event.target.area.globalPosition.x + ',' + event.target.area.globalPosition.y + ')\nwidth:'
+ event.target.area.width + '\nheight:' + event.target.area.height) + event.target.area.width + '\nheight:' + event.target.area.height)
}) })
Text(this.text) Text(this.text)
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
``` ```
// Display only Hello Component1 on the preview. The content under MyComponent is displayed on the real device.
@Entry @Entry
@Component @Component
struct MyComponent { struct MyComponent {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册