## UniNativeViewElement
native-view 元素对象
### UniNativeViewElement 兼容性
Android: 4.31; iOS: 4.31; HarmonyOS: 4.61
```mermaid
graph LR
UniNativeViewElement -- Extends --> UniElement
style UniElement color:#42b983
click UniElement "https://doc.dcloud.net.cn/uni-app-x/api/dom/unielement.html"
```
### UniNativeViewElement 的方法 @uninativeviewelement-methods
#### bindAndroidView(view: View): void @bindandroidview
绑定安卓平台原生view
##### bindAndroidView 兼容性
Android: 4.31; iOS: x; HarmonyOS: x
##### 参数
| 名称 | 类型 | 必填 | 兼容性 |
| :- | :- | :- | :-: |
| view | View | 是 | iOS: x; HarmonyOS: x |
#### bindIOSView(view: UIView): void @bindiosview
绑定IOS平台原生view
##### bindIOSView 兼容性
Android: x; iOS: x; iOS(VDOM) UTS 插件: 4.31; HarmonyOS: x
##### 参数
| 名称 | 类型 | 必填 | 兼容性 |
| :- | :- | :- | :-: |
| view | UIView | 是 | Android: x; iOS: x; iOS(VDOM) UTS 插件: 4.31; HarmonyOS: x |
#### bindHarmonyFrameNode(node: FrameNode): void @bindharmonyframenode
绑定鸿蒙 FrameNode
##### bindHarmonyFrameNode 兼容性
Android: x; iOS: x; HarmonyOS(VDOM): 4.61; HarmonyOS(Vapor): 5.31
##### 参数
| 名称 | 类型 | 必填 | 兼容性 |
| :- | :- | :- | :-: |
| node | FrameNode | 是 | Android: x; iOS: x |
#### bindHarmonyWrappedBuilder\(builder: WrappedBuilder\<\[options: O]>, options?: ESObject): BuilderNode\<\[O]> @bindharmonywrappedbuilder
绑定鸿蒙 wrapperBuilder
##### bindHarmonyWrappedBuilder 兼容性
Android: x; iOS: x; HarmonyOS: 4.61
##### 参数
| 名称 | 类型 | 必填 | 兼容性 |
| :- | :- | :- | :-: |
| builder | WrappedBuilder\<\[options: O]> | 是 | Android: x; iOS: x |
| options | ESObject | 否 | Android: x; iOS: x |
##### 返回值
| 类型 |
| :- |
| BuilderNode\<\[O]> |
#### getHarmonyFrameNode(): FrameNode \| null @getharmonyframenode
获取鸿蒙 FrameNode
##### getHarmonyFrameNode 兼容性
Android: x; iOS: x; HarmonyOS(VDOM): 4.61; HarmonyOS(Vapor): 5.31
##### 返回值
| 类型 | 必备 |
| :- | :- |
| FrameNode | 否 |
#### getHarmonyBuilderNode\(): BuilderNode\<\[O]> @getharmonybuildernode
获取鸿蒙 BuilderNode
##### getHarmonyBuilderNode 兼容性
Android: x; iOS: x; HarmonyOS(VDOM): 4.61; HarmonyOS(Vapor): x
##### 返回值
| 类型 |
| :- |
| BuilderNode\<\[O]> |
#### bindHarmonyController\(controller: T): void @bindharmonycontroller
绑定鸿蒙控制器
##### bindHarmonyController 兼容性
Android: x; iOS: x; HarmonyOS: 4.61
##### 参数
| 名称 | 类型 | 必填 | 兼容性 |
| :- | :- | :- | :-: |
| controller | T | 是 | Android: x; iOS: x |
## tips
鸿蒙有多种原生视图可以绑定,有bindHarmonyController、bindHarmonyWrappedBuilder、bindHarmonyFrameNode。
在 uni-app x 蒸汽模式下,bindHarmonyFrameNode的性能更高一些。