Angular 中修改bootstrap的模态框(modal)大小
来源:互联网 发布:凤岗数控车床编程培训 编辑:程序博客网 时间:2024/05/17 16:45
Angular 中修改bootstrap的模态框(modal)大小
自己瞎搞改width的后果。。。
看官网文档:https://ng-bootstrap.github.io/#/components/modal/examples
https://github.com/ng-bootstrap/ng-bootstrap/blob/master/src/modal/modal.ts
最终解决:
showWarnningModal() { this.modalService.open(this.warnningModal, { size: 'lg' }).result.then((result) => { if (result === 'OK') { // this.loadTopQueueDeliveryOrder(); } }, (reason) => { // this.closeResult = `Dismissed ${this.getDismissReason(reason)}`; }); }
import { Injector,ComponentFactoryResolver } from '@angular/core';
import { NgbModalStack }from './modal-stack';
import { NgbModalRef }from './modal-ref';
/**
* Represent options available when opening new modal windows.
*/
export interfaceNgbModalOptions {
/**
* Whether a backdrop element should be created for a given modal (true by default).
* Alternatively, specify 'static' for a backdrop which doesn't close the modal on click.
*/
backdrop?: boolean| 'static';
/**
* An element to which to attach newly opened modal windows.
*/
container?: string;
/**
* Whether to close the modal when escape key is pressed (true by default).
*/
keyboard?: boolean;
/**
* Size of a new modal window.
*/
size?: 'sm'| 'lg';
/**
* Custom class to append to the modal window
*/
windowClass?: string;
}
/**
* A service to open modal windows. Creating a modal is straightforward: create a template and pass it as an argument to
* the "open" method!
*/
export declareclass NgbModal {
private _moduleCFR;
private _injector;
private _modalStack;
constructor(_moduleCFR:ComponentFactoryResolver, _injector:Injector, _modalStack:NgbModalStack);
/**
* Opens a new modal window with the specified content and using supplied options. Content can be provided
* as a TemplateRef or a component type. If you pass a component type as content than instances of those
* components can be injected with an instance of the NgbActiveModal class. You can use methods on the
* NgbActiveModal class to close / dismiss modals from "inside" of a component.
*/
open(content:any, options?:NgbModalOptions):NgbModalRef;
}
阅读全文
0 0
- Angular 中修改bootstrap的模态框(modal)大小
- angular-bootstrap中modal显示不了的问题解决
- 修改bootstrap modal模态框的宽度
- bootstrap中自定义modal大小并始终居中的modal综合布局demo
- angular-ui-bootstrap-modal必须要说的几个点
- angular中 modal模态框(可复用)
- 在BootStrap的modal中使用Select2
- bootstrap中modal的简单使用
- bootstrap的模态框modal的hidden.bs.modal属性
- BootStrap的modal模态框的使用
- Bootstrap的js插件之模态框(modal)
- bootstrap的modal模态框提交信息
- 关于bootstrap的modal
- bootstrap modal 在IOS9中不能弹出的问题 IOS 9 bootstrap modal ios 9 noticework
- 扩展bootstrap的modal模态框-动态添加modal框-弹出多个modal框
- bootstrap 中 modal里面的remote 缓存问题
- ueditor在bootstrap的modal中显示,高度无法自适应
- ng中在主页面弹出bootstrap的modal
- 广播接收者
- 数据库与JavaBean字段名不一致处理
- [C/C++] 算法提高 5-3日历
- 多线程中的线程间通信及等待/通知机制的两种实现方式
- Oracle起步---创建临时表空间/表空间/创建用户/授权
- Angular 中修改bootstrap的模态框(modal)大小
- 新加坡央行公布“Project Ubin”第二阶段工作细节
- C# 内部类
- PAT乙级1060 爱丁顿数
- 巴西央行加速进行区块链研发
- 工作中常用的几个git命令
- HTML和CSS入门(6)
- 前端解决ios手机竖拍上传图片旋转90° 完美适配:Android/ios/Windows
- 英国金融行为监管局针对加密货币差价合约提出警告