bootstrap中2个modal弹框

bootstrap的modal 1上弹出modal 2,或者modal 1上弹出一个iview的确认框;

```

```

借鉴1自:https://blog.csdn.net/k358971707/article/details/71908862?utm_source=blogxgwz2
借鉴2自:https://blog.csdn.net/wzp6010625/article/details/78728894?utm_source=blogxgwz5
然后将对应的第一个modal 1的id,以及触发弹出modal 1 的方法中,将对应的设置z-index的方法加上

showModalOne: function (data) {
       
        $('#modalOne').on('show.bs.modal', '.modal', function(event) {
            $(this).appendTo($('#modalOne'));
        }).on('shown.bs.modal', '.modal.in', function(event) {
            setModalsAndBackdropsOrder();
        }).on('hidden.bs.modal', '.modal', function(event) {
            setModalsAndBackdropsOrder();
        });
        $('#modalOne').modal('show');
      },


如果还有iview的确认框

this.$Modal.confirm(config);
//在确认框弹窗来之后,将对应的z-index的进行调整

$('.ivu-modal-wrap').css('z-index','1601');
$('.ivu-modal-mask').css('z-index','1601');

你可能感兴趣的:(前端,vue)