openharmony 鸿蒙 changelogs-arkui

2025-06-12 浏览 (1)

ArkUI Subsystem Changelog

cl.arkui.1 Method Name Changes in NavPathStack

Key API/Component Changes

NavPathStack

Before ChangeAfter Change
pushpushPath
pushNamepushNameByPath
popToPopToName

Change Impact

After the SDK is updated to 4.0.10.x, if any of the old method names is used in the code, a compilation error will be reported.
Property 'push' does not exist on type 'NavPathStack'.
Property 'pushName' does not exist on type 'NavPathStack'.
Property 'pop' does not exist on type 'NavPathStack'.

Adaptation Guide

Update the code to use the new method names.

navPathStack = new NavPathStack();
this.navPathStack.push(...)
this.navPathStack.pushPath(...)

this.navPathStack.pushName('navidesnation_add',this.value)
this.navPathStack.pushPathByName('navidesnation_add',this.value) 

this.navPathStack.pop('navidesnation_add')
this.navPathStack.popToName('navidesnation_add')

你可能感兴趣的鸿蒙文章

harmony 鸿蒙File Subsystem Changelog

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/7mtOU5