主要配置 shadow:{radius:0}@Entry @Component struct Index { @State customPopup: boolean = false // popup构造器定义弹框内容 @Builder popupBuilder() { Row({ space: 2 }) { Text('This is Custom Popup').fontSize(15) }.width(200).height(50).padding(5) } build() { Column() { Button('CustomPopupOptions') .position({ x: 100, y: 200 }) .onClick(() => { this.customPopup = !this.customPopup }) .bindPopup(this.customPopup, { builder: this.popupBuilder, // 气泡的内容 placement: Placement.Bottom, // 气泡的弹出位置 popupColor: Color.Transparent, // 气泡的背景色 backgroundBlurStyle: BlurStyle.NONE, shadow: { radius: 0 }, // shadow:ShadowStyle.OUTER_DEFAULT_XS, onStateChange: (e) => { console.info(JSON.stringify(e.isVisible)) if (!e.isVisible) { this.customPopup = false } } }) } .backgroundColor(Color.Pink) .height('100%') .width("100%") } }
主要配置 shadow:{radius:0}