Skip to content

代码片段

suyan edited this page Jul 20, 2022 · 3 revisions

从下向上弹出效果

<transition name="sy" appear>
<div class="agg-doc-list-wrap"></div>
</transition>


.sy-enter-active
    animation: docListAnimation .35s linear
.sy-leave-active
    animation: docListAnimation .35s linear reverse

@keyframes docListAnimation {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

禁用滚动

watch: {
        lockScreen: {
            immediate: true,
            handler(val) {
                if (val) {
                    $('html').css({
                        height: '100vh',
                        overflow: 'hidden'
                    });
                }
                else {
                    $('html').css({
                        height: 'auto',
                        overflow: 'scroll'
                    });
                }
            }
        }
    },
Clone this wiki locally