通过配置ShadowOptions实现阴影效果的灵活控制。在ShadowOptions模式中,当满足radius设置为0时,即可实现无阴影效果。
@Entry @Component struct PopupExample { @State customPopup: boolean = false; build() { Column({ space: 100 }) { Button('popup') .margin({ top: 50 }) .onClick(() => { this.customPopup = !this.customPopup; }) .bindPopup(this.customPopup, { message: 'this is a popup', arrowHeight: 20, arrowWidth: 20, radius: 20, shadow: { radius: 0 }, }); } .width('100%'); } }