From f64717f2ef7480e6cebcece519491b548f25d36a Mon Sep 17 00:00:00 2001 From: duqingquan Date: Sat, 14 Jan 2023 12:55:16 +0800 Subject: [PATCH] =?UTF-8?q?uts=20=E7=BB=84=E4=BB=B6=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/plugin/uts-component.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/docs/plugin/uts-component.md b/docs/plugin/uts-component.md index 677f60653..17847af7d 100644 --- a/docs/plugin/uts-component.md +++ b/docs/plugin/uts-component.md @@ -377,12 +377,12 @@ NVMeasure 用于告诉排版系统,组件自身需要的宽高,具体的调 |:------- |:-------- |:-------- |:--- |:--- | |$el |对象 |当前View实例对象 |全部平台 |开发者在NVLoad返回的对象类型| |$androidContext|对象 |当前组件上下文 |仅android |android平台对应Context对象| -|emit("event",Any)|函数 |发送已注册的事件 |全部平台 |emit(事件名称-必选,事件参数可选)| +|$emit("event",Any)|函数 |发送已注册的事件 |全部平台 |$emit(事件名称-必选,事件参数可选)| -#### 组件的通用事件 +#### 通用事件 -对于UTS组件来说,除了通过 emit/emits 函数来自定义事件外,UTS组件还内置了下列标准事件,组件的使用者无需实现,直接使用 +对于UTS组件来说,除了通过 $emit/emits 函数来自定义组件事件外,UTS组件还内置了下列通用事件: |事件名称 |简介 @@ -391,6 +391,12 @@ NVMeasure 用于告诉排版系统,组件自身需要的宽高,具体的调 |longpress |组件长按事件响应 +通用事件,组件的使用者无需实现,直接使用 + +```js + +``` + ## 简单View的示例 @@ -587,7 +593,7 @@ UTS组件建议使用远程依赖的方式集成,如果需要以AAR的形式 override onAnimationStart(animation: Animator | null) {} override onAnimationEnd(animation: Animator | null, isReverse: Boolean) { - this.comp.emit("bindended") + this.comp.$emit("bindended") } override onAnimationEnd(animation: Animator | null) {} -- GitLab