mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2025-03-01 17:17:56 +00:00
PopoverDialog问题修改
Signed-off-by: zWX1284381 <zhaobinbin8@h-partners.com>
This commit is contained in:
parent
9e9cf9c4c6
commit
65bc061eec
@ -4048,7 +4048,7 @@ export class PopoverDialog extends ViewPU {
|
||||
this.__visible = new SynchedPropertySimpleTwoWayPU(o.visible, this, 'visible');
|
||||
this.__popover = new SynchedPropertyObjectOneWayPU(o.popover, this, 'popover');
|
||||
this.targetBuilder = undefined;
|
||||
this.__dialogWidth = new ObservedPropertyObjectPU(this.popover.width, this, 'dialogWidth');
|
||||
this.__dialogWidth = new ObservedPropertyObjectPU(this.popover?.width, this, 'dialogWidth');
|
||||
this.setInitiallyProvidedValue(o);
|
||||
this.finalizeConstruction();
|
||||
}
|
||||
@ -4104,6 +4104,15 @@ export class PopoverDialog extends ViewPU {
|
||||
this.__dialogWidth.set(h);
|
||||
}
|
||||
|
||||
emptyBuilder(n = null) {
|
||||
}
|
||||
|
||||
aboutToAppear() {
|
||||
if (this.targetBuilder === undefined || this.targetBuilder === null) {
|
||||
this.targetBuilder = this.emptyBuilder;
|
||||
}
|
||||
}
|
||||
|
||||
initialRender() {
|
||||
PUV2ViewBase.contextStack && PUV2ViewBase.contextStack.push(this);
|
||||
this.observeComponentCreation2((b, c) => {
|
||||
|
@ -1643,7 +1643,17 @@ export struct PopoverDialog {
|
||||
@Link visible: boolean;
|
||||
@Prop popover: PopoverOptions;
|
||||
@BuilderParam targetBuilder: Callback<void>;
|
||||
@State dialogWidth: Dimension | undefined = this.popover.width;
|
||||
@State dialogWidth: Dimension | undefined = this.popover?.width;
|
||||
|
||||
@Builder
|
||||
emptyBuilder() {
|
||||
}
|
||||
|
||||
aboutToAppear(): void {
|
||||
if (this.targetBuilder === undefined || this.targetBuilder === null) {
|
||||
this.targetBuilder = this.emptyBuilder;
|
||||
}
|
||||
}
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user