该问题可以参考开发指南:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-bundlemanager-V5\#bundlemanagergetbundleinfoforself参考代码:import BuildProfile from ‘BuildProfile’; @Entry @Component struct Index { @State mode:string = BuildProfile.BUILD_MODE_NAME ... }
该问题可以参考开发指南:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-bundlemanager-V5\#bundlemanagergetbundleinfoforself
参考代码: