當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript angular2-modal.Modal類代碼示例

本文整理匯總了TypeScript中angular2-modal.Modal的典型用法代碼示例。如果您正苦於以下問題:TypeScript Modal類的具體用法?TypeScript Modal怎麽用?TypeScript Modal使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Modal類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: prompt

export function prompt(modal: Modal) {
    return modal.prompt()
        .size('lg')
        .title('A simple Prompt style modal window')
        .body(`
            <h4>Prompt is a classic (title/body/footer) 1 button modal window that 
            blocks.</h4>
            <b>Configuration:</b>
            <ul>
                <li>Blocks (only button click can dismiss)</li>
                <li>Size large</li>
                <li>Keyboard can not dismiss</li>
                <li>HTML content</li>
            </ul>`);
}
開發者ID:NicolasCayet,項目名稱:angular2-modal,代碼行數:15,代碼來源:presets.ts

示例2: alert

export function alert(modal: Modal) {
    return modal.alert()
        .size('lg')
        .title('A simple Alert style modal window')
        .body(`
        <h4>Alert is a classic (title/body/footer) 1 button modal window that 
        does not block.</h4>
        <b>Configuration:</b>
        <ul>
            <li>Non blocking (click anywhere outside to dismiss)</li>
            <li>Size large</li>
            <li>Dismissed with default keyboard key (ESC)</li>
            <li>Close wth button click</li>
            <li>HTML content</li>
        </ul>`);
}
開發者ID:NicolasCayet,項目名稱:angular2-modal,代碼行數:16,代碼來源:presets.ts

示例3: confirm

export function confirm(modal: Modal) {
    return modal.confirm()
        .size('lg')
        .titleHtml(`
            <div class="modal-title" 
                 style="font-size: 22px; color: grey; text-decoration: underline;">
                 A simple Confirm style modal window</div>`)
        .body(`
            <h4>Confirm is a classic (title/body/footer) 2 button modal window that blocks.</h4>
            <b>Configuration:</b>
            <ul>
                <li>Blocks (only button click can close/dismiss)</li>
                <li>Size large</li>
                <li>Keyboard can not dismiss</li>
                <li>HTML Title</li>
                <li>HTML content</li>
            </ul>`);
}
開發者ID:NicolasCayet,項目名稱:angular2-modal,代碼行數:18,代碼來源:presets.ts

示例4: cascading

export function cascading(modal: Modal) {
    let presets = [];

    presets.push(alert(modal));
    presets.push(prompt(modal));
    presets.push(confirm(modal));
    presets.push(
        modal.prompt()
            .size('sm')
            .title('Cascading modals!')
            .body('Find your way out...')
    );

    return {
        open: () => {
            let ret = presets.shift().open();
            while (presets.length > 0) presets.shift().open();
            return ret;
        }
    };
}
開發者ID:NicolasCayet,項目名稱:angular2-modal,代碼行數:21,代碼來源:presets.ts

示例5: inElement

export function inElement(modal: Modal) {
    return modal.prompt()
        .size('sm')
        .title('A modal contained by an element')
        .body('Try stacking up more modals!');
}
開發者ID:NicolasCayet,項目名稱:angular2-modal,代碼行數:6,代碼來源:presets.ts


注:本文中的angular2-modal.Modal類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。