底部导航栏,点击后跳转到登录页面,未登录状态返回,Tabs应该还选中上一个,而不是选中当前怎么写拦截,登录成功后再刷新当前选中当前Tabs。业务bufenBuilderview(){Stack(){if(this.currentBreakpointBreakpointTypeEnum.LG){Image($r('app.media.appicon')).width(CommonConstants.FULLPERCENT).height(CommonConstants.FULLPERCENT)}Flex({direction:this.currentBreakpointBreakpointTypeEnum.LGFlexDirection.RowReverse:...
代码如下:RichText(this.planItem.contentExplain).onStart((){console.info('RichTextonStart');}).onComplete((){console.info('RichTextonComplete');}).width('100%').height('auto')this.planItem.contentExplain"文本内容"
在屏幕上滑动时需要区分是手指(Finger)和手写笔(Pen),使用sourceTool枚举类型,在手机上测试Finger和Pen都是undefined。1.用sourceTool区分是否可行?letfingerType:SourceToolevent.sourceTool;打印日志显示:SourceTool.Fingerundefined;SourceTool.Penundefined;2.是不是在带笔的其他设备上如平板,才会显示Finger和Pen的值?
预览器预览的时候有的自定义弹窗controller、BuildParams必须要求默认值文档示例都没要求默认值,这种默认值要怎么默认controller:CustomDialogControllernewCustomDialogController({builder:null})BuilderdefaultBuilder(){}而且有的文件里没给初始化也通过了,有的文件又不行,有的昨天没问题正常预览,今天就弹个问题要求默认值,预览器是否存在bug
在应用中打开或者关闭输入法时,出现页面整体上移情况,如何禁止页面整体上移的发生?
svg图片想设置线条颜色,使用.colorBlend(‘00000’)和.colorBlend(‘3300000’)效果是一样的,这里颜色透明度要怎么设置?
dialog如果不关闭,跳转下一个页面时,依然显示在最上层,有方法可以让弹窗只在当前页面显示吗?
类似于悬浮窗权限这种systembasic级别的权限,授权方式为systemgrant需要我们怎么申请呢?
在EntryAbility.ets文件的onCreate(want:Want,launchParam:AbilityConstant.LaunchParam):void{hilog.info(0x0000,'testTag','%{public}s','AbilityonCreate');this.getPermission(want);letstatusVpuMoreCardPicPreKV.initICCardRecognizer('');}调用了VpuMoreCardPicPreKV闪退,提示闪退原因:Pid:20507Uid:20020081Reason:TypeErrorErrorname:TypeErrorErrormessage:CannotreadpropertyfilesDirofundefinedSourceCode:letfil...
点击收藏取消收藏不刷新,ForumsModel是一个多层嵌套模型。尝试以下方法都无用:方法一:对数据源进行删除再添加操作,不起作用。方法二:对数据源加入唯一索引字段,不起作用。方法三:抽离listItem内容,单独组件。
能否在自定义类中监听到页面的销毁?自己编写了一个类,想要做到在自己的类中监测页面销毁时,执行自己的delete方法。不想要在页面层去调用方法。exportclassGlobalRequest{listenList:number[][]registerObserver:Array[]staticglobalRequest:GlobalRequeststaticcreateGlobalRequest(){if(GlobalRequest.globalRequest){console.log('我已经创建过了')returnGlobalRequest.globalRequest}else{letglobalRequestnewGlobalReque...
Api12RouterModule.getRouter(router.routerName).pushPath({name:router.builderName,param:router.param,onPop:(popInfo:PopInfo){if(onPop){onPop(popInfo)}}},animated);调用pop(result,animated)后,onPop回调代码不执行
主页有5个Tab,有一个tab的页面是web页面,这个web页面需要全屏透到状态栏,但是Tabs组件无法全屏,只能用.expandSafeArea([SafeAreaType.SYSTEM],[SafeAreaEdge.TOP])颜色透到状态栏内容不能透状态栏,这个应该怎么解决?
RequirePropWatch("viewModelUpdate")viewModel:CreditTradeViewModelStatetrendComponentParam:TrendComponentParamnewTrendComponentParam(this.viewModel.stockCode,this.viewModel.stockType,this.viewModel.stockName)viewModelUpdate(){this.trendComponentParam.stockCodethis.viewModel.stockCodethis.trendComponentParam.stockTypethis.viewModel.stockTypethis.trendComponentParam.stockNamethis.viewModel.stockNa...
代码片段:import{webview}from'kit.ArkWeb';EntryComponentstructArticleDetailPage{controller:webview.WebviewControllernewwebview.WebviewController();build(){Column(){List(){ListItem(){this.titleBuilder()}ListItem(){this.webBuilder()}.hitTestBehavior(HitTestMode.Block)}.height('100%').width('100%')}}BuildertitleBuilder(){Column(){Text('标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标...
现象1:onAppear没有出现在屏幕上也触发了回调现象2:waterflow的itemProgressFootbuilder在出现在屏幕上的时候onAppear调了一次,再次出现在屏幕上的时候没有出发回调
HarmonyOS环境,如何获取顶部导航栏和底部导航的高度,能提供下相关文档或者代码示例吗?
使用Navigation实现路由的时候有一种场景,需要跳转到单例页面,这个时候使用moveIndexToTop实现如何带参数过去?
代码如下:EntryComponentstructRefreshExample{StateisRefreshing:booleanfalseStatearr:String[]['0','1','2','3','4','5','6','7','8','9','10']Statearr:String[]['0','1']BuildercustomRefreshComponent(){Stack(){Row(){LoadingProgress().height(32)Text("正在刷新...").fontSize(16).margin({left:20})}.alignItems(VerticalAlign.Center)}.width("100%").align(Alignment.Center)}build(){Column(){Refresh({refreshin...
hm673c38ebd6bf2 的精彩回答获得了0 赞同
hm673c38ebd6bf2 的精彩回答获得了0 赞同
hm673c38ea9f4b2 的精彩回答获得了0 赞同
hm673c38ea9f4b2 的精彩回答获得了0 赞同
hm673c38d47e470 的精彩回答获得了0 赞同