Skip to content

Commit

Permalink
feat(ohos): add some log for custom component
Browse files Browse the repository at this point in the history
  • Loading branch information
sohotz authored and etkmao committed Mar 3, 2025
1 parent ec55a02 commit 04ed983
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { buildHippyRenderView } from 'hippy/src/main/ets/renderer_native/HippyRe
import { NativeRenderContext } from 'hippy/src/main/ets/renderer_native/NativeRenderContext'
import { HRPadding, HRRect } from 'hippy/src/main/ets/renderer_native/utils/HRTypes'
import { HippyAny, HippyRenderCallback } from 'hippy/src/main/ets/support/common/HippyTypes'
import { LogUtils } from 'hippy/src/main/ets/support/utils/LogUtils'

@Observed
export class ExampleViewA extends HippyCustomComponentView {
Expand Down Expand Up @@ -64,6 +65,8 @@ export struct ExampleComponentA {
@ObjectLink children: HippyObservedArray<HippyRenderBaseView>

aboutToAppear() {
LogUtils.d('hippy demo', 'A to appear, tag: ' + this.renderView.tag)

// 自定义事件举例
let event = new HippyViewEvent("onEvent1")
let params = new Map<string, string>()
Expand All @@ -72,7 +75,7 @@ export struct ExampleComponentA {
}

aboutToDisappear() {

LogUtils.d('hippy demo', 'A to disappear, tag: ' + this.renderView.tag)
}

build() {
Expand Down

0 comments on commit 04ed983

Please sign in to comment.