3

背景 -> ウィンドウ -> 背景 -> ウィンドウのような背景を持つモーダル内にモーダルを開きたい

角度のある基盤でそれをどのように達成できますか?

http://madmimi.github.io/angular-foundation/

ありがとう!

4

2 に答える 2

1

angular-foundation は、別のモーダル内のモーダルをサポートしていません。z-index 値はハードコーディングされています。

モーダルに代わるソリューションがありますが、それは私たちには合いませんでした。 http://foundation.zurb.com/docs/components/reveal.html

それを行うためのディレクティブを実装しました(typescript)-

export function ModalPositionHelper($modalStack):ng.IDirective {
    var initialModalZIndex = 1005;
    return {
        restrict: 'A',
        link: function (scope) {
            scope.$watch(function () {
                return $modalStack.getTop();
            }, function (newModal, oldModal) {
                if (oldModal) {
                    oldModal.value.modalDomEl.css('z-index', initialModalZIndex);
                }
                if (newModal) {
                    newModal.value.modalDomEl.css('z-index', initialModalZIndex + 2);
                    angular.element('.reveal-modal-bg').css('z-index', initialModalZIndex + 1);
                }
            });
        }
    };
}

基本的に、私は $modalStack.getTop() を監視し、z-index を変更します。

于 2014-12-24T12:17:46.900 に答える
0

これがもたらす優れたユーザー エクスペリエンスはありません。アプローチを再考することは、ダブルモーダルよりも優れています。一部の修正は、コードに関連していません。

于 2014-12-24T16:36:00.060 に答える