From 5c423918db6de4b4af95742d8b28018b5b8c1066 Mon Sep 17 00:00:00 2001 From: shutao Date: Wed, 11 Sep 2024 19:17:45 +0800 Subject: [PATCH] update native-vue-component.md --- docs/plugin/native-vue-component.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/plugin/native-vue-component.md b/docs/plugin/native-vue-component.md index 375718c2..435abf9c 100644 --- a/docs/plugin/native-vue-component.md +++ b/docs/plugin/native-vue-component.md @@ -65,7 +65,7 @@ HBuilder X 选中你的项目,项目根目录选中uni_modules目录,右键 ``` -#### native-view 与 原生view 进行绑定 +#### native-view 与 UTS插件关联 引入 native-button 插件, native-view 初始化时会触发 @init 事件,此时创建UTS插件实例button对象,vue组件用button调用UTS插件相关的API。将 UniNativeViewElement 通过button对象传递给UTS插件,进行view关联绑定 ```uts @@ -86,7 +86,6 @@ HBuilder X 选中你的项目,项目根目录选中uni_modules目录,右键 onviewinit(e : UniNativeViewInitEvent) { //获取UniNativeViewElement 实例化NativeButton将element以构造参数传递给NativeButton插件 this.button = new NativeButton(e.detail.element); - this.button?.updateText(this.value) } } } -- GitLab