自定义对话框(Modal Dialog)应该在nativescript angular2中显示一半的屏幕
Custom dialog(Modal Dialog) should display half of the screen in nativescript angular2
当单击浮动操作按钮时,我使用自定义模式对话框将列表视图显示到屏幕的一半。
但它正在全屏显示,如下图所示:
我尝试将布尔变量 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();
}
任何帮助都是appreciated.thanks。
这是 iOS 上的本机行为。
By design on iPhone, a modal page appears only in fullscreen.
记下here
当单击浮动操作按钮时,我使用自定义模式对话框将列表视图显示到屏幕的一半。
但它正在全屏显示,如下图所示:
我尝试将布尔变量 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();
}
任何帮助都是appreciated.thanks。
这是 iOS 上的本机行为。
By design on iPhone, a modal page appears only in fullscreen.
记下here