点击浮动操作按钮时,我使用自定义模式对话框将列表视图显示为屏幕的一半。
但它正如下图所示全屏:
我尝试将布尔变量fullScreen设置为false
,然后仅显示全屏。
ts档案:
public showModal() {
console.log("showmod", "Test");
let options = {
context: {},
fullscreen: false,
viewContainerRef: this.vcRef
};
this.modal.showModal(ModalComponent, options).then(res => {
console.log("ModRes :", ""+res);
});
}
dialogs.d.ts :( node-modules / nativescript-angular / directives)
import { ViewContainerRef, Type } from "@angular/core";
export interface ModalDialogOptions {
context?: any;
fullscreen?: boolean;
viewContainerRef?: ViewContainerRef;
}
export declare class ModalDialogParams {
context: any;
closeCallback: (...args) => any;
constructor(context: any, closeCallback: (...args) => any);
}
export declare class ModalDialogService {
showModal(type: Type<any>, options: ModalDialogOptions): Promise<any>;
private static showDialog(type, options, doneCallback, containerRef, resolver, parentPage, pageFactory);
}
export declare class ModalDialogHost {
constructor();
}
感谢任何帮助。谢谢。