HarmonyOS CustomDialog位置问题
@State iconButtonLocation:IconButtonLocation = new IconButtonLocation(0,0)
vehicleControlMenuController: CustomDialogController = new CustomDialogController({
builder: VehicleControlMenu({
menuList: this.vehicleControlMenuList,
click: this.popVehicleControlItem.bind(this),
}),
customStyle: true,
isModal: true,
showInSubWindow: true,
offset: {dx:this.iconButtonLocation.locationX,dy:this.iconButtonLocation.locationY},
})
如上,通过修改iconButtonLocation.locationX和iconButtonLocation.locationY的值并不能更新VehicleControlMenu位置。
HarmonyOS
赞
收藏 0
回答 1
待解决
目前自定义弹窗的所有参数,不支持动态刷新。参考链接如下:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/ts-methods-custom-dialog-box-V5