在使用bindPopup时,发现在屏幕中间位置使用targetSpace距离正常,但是屏幕两侧时targetSpace展示距离太大,导致UI展示异常。代码如下:.bindPopup(this.handlePopup,{CustomPopupOptions类型气泡的内容builder:this.popupBuilder,placement:Placement.Top,targetSpace:10,enableArrow:true,气泡弹出时不显示箭头popupColor:"333333",backgroundBlurStyle:BlurStyle.NONE,关闭气泡的模糊背景showInSubWindow:true,arrowWidth:10,arrowHeight:4,
1、页面跳转时传递参数,参数数据大小有限制吗?2、如果有数据量大小的限制,使用router跳转和Navigation跳转,数据量大小限制分别是多少?
viewmodel模式有个对话框根据请求网络还是请求缓存来决定是否显示,所有这个loadingPageStatus需要放到viewmodel中。但是如何watch他的变化来显示对话框,代码如下:import{NavigationManager}from'cmbrouter';importhilogfrom'ohos.hilog';ComponentexportstructPage{build(){NavDestination(){RelativeContainer(){Button('跳转至测试页').fontSize(50).fontWeight(FontWeight.Bold).alignRules({center:{anchor:'container',...
如图Refresh里包含着Tabs,现在需求是当Refresh刷新后要重置Tabs内的数据,怎么重置?
CustomDialogexportstructViewBoardCustomDialog{controller:CustomDialogControllernewCustomDialogController({builder:ViewBoardCustomDialog()})onStart:(isReadOnly:boolean)void(isReadOnly:boolean){}build(){Column(){Button("创建只读白板").onClick(e{this.onStart(true);}).margin({top:10,bottom:10})Button("创建读写白板").onClick(e{this.onStart(false);}).margin({top:10,bottom:10})}}}
Navigation跳转到具体Component,Component自己实现的onBackPress响应不到,这个有啥解决方案吗?NavDestination这里实现backpress返回false我看也没用
子控件设置宽度100%,当再添加margin属性,子控件的展示宽度仍然是屏幕宽度,导致右侧超出屏幕无法展示,这是个bug还是就是这样设计的,如果是这样设计的目的和优势是什么?
如何实现拖拽Grid中的元素并使其换位,例如一共九个GridItem,将第九个GridItem拖拽到第一个的位置。使用了onItemDragMove没有收到监听事件。
现在项目中使用的都是svga动画,而且部分动画还是后端动态返回的,可以推进一下对svga动画的支持吗?
我们有个业务需求,需要在代码判断是否显示,如果显示则隐藏。但参考这个文档https:developer.huawei.comconsumercndocharmonyosreferencesV5tsmethodscustomdialogboxV5并没有发现判断是否正在显示的接口,如果通过业务维护标志位,那未免太过繁琐。
现在有pageA通过router跳转pageB。现在想要实现的效果是pageB的背景可以透明,即在pageB的界面可以看到pageA的部分界面。
import{promptAction}from'kit.ArkUI'letcustomDialogId:number0BuilderexportfunctionbuildText(){Column(){Text('CustomdialogMessage').fontSize(10)Row(){Button("确认").onClick((){promptAction.closeCustomDialog(customDialogId)})Blank().width(50)Button("取消").onClick((){promptAction.closeCustomDialog(customDialogId)})}}.height(200).padding(5)}自定义组件的内容axiosClient.interceptors.response.use(asyn...
ScrollView滑动回弹,只留下面回弹效果,不留上面回弹,所以滑动到最上面时设置this.scroller.scrollTo({xOffset:0,yOffset:0});使用onScroll没有问题,换成onWillScroll会闪退,报错如下Pid:62737Uid:20020126Reason:RangeErrorErrorname:RangeErrorErrormessage:Stackoverflow!SourceCode:this.scroller.scrollTo({xOffset:0,yOffset:0});
父组件设置borderRadius参数无法裁切自组件的边框,代码如下:ComponentstructChild{build(){Image('').backgroundColor(Color.Gray).width('100%').height('100%')}}ComponentstructChild{build(){Child().width(40).height(40).borderRadius(20)设置该边框的圆角属性无法裁剪Child组件的边框}}
在父组件中引入子组件InputDialog,传递了callback作为prop但是子组件调用报错。ComponentstructFlexItem{Proptitle:string""Propvalue:stringnumber""controller:CustomDialogControllernewCustomDialogController({builder:InputDialog({callback:(){this.callBack}}),cornerRadius:"12lpx"})callBack(name:string){console.log("确定",name)}}子组件:CustomDialogComponentstructInputDialog{StatetagName:string""Propcall...
应用需要适配ipad,并支持屏幕旋转,希望设备是手机类型时,不支持旋转,类型是平板的,可以旋转,我参考了这些文档,没找到相关设置:https:developer.huawei.comconsumercndocharmonyosguidesV5arktsrotationtransitionanimationV5https:developer.huawei.comconsumercndocharmonyosguidesV5moduleconfigurationfileV5
在自定义安全键盘的时候,GridItem里的text按压时无法改变文字颜色。给text添加onTouch事件,去监听down,改变变量item入参也无法反应到ui上。
操作步骤:1、声明一个变量,如下:StateamountText:string""2、在组件中使用以上变量,如下:Row(){图标Column(){Image($r('app.media.icondollar')).width('24vp').height('24vp').fillColor($r('app.color.iconlabel'))}.justifyContent(FlexAlign.Center)输入TextInput({text:this.amountText,placeholder:"0.00"}).flexShrink(1).placeholderColor($r('app.color.placeholder')).fontColor($r('app.color.texthighlight'))...
wx662108d97e2cc 的精彩回答获得了0 赞同
hm673c38c974de6 的精彩回答获得了0 赞同
hm673c38c974de6 的精彩回答获得了0 赞同
hm673c38ebd6bf2 的精彩回答获得了0 赞同
hm673c38ebd6bf2 的精彩回答获得了0 赞同