add app-shell, master-detail, pane-transition
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
<template>
|
||||
<div
|
||||
class="page-transition"
|
||||
:class="{ 'page-transition-reduced-motion': props.respectReducedMotion }"
|
||||
>
|
||||
<div class="page-transition">
|
||||
<RouterView v-slot="{ Component, route }">
|
||||
<Transition
|
||||
:name="transitionName"
|
||||
@@ -81,10 +78,6 @@ const props = defineProps({
|
||||
},
|
||||
transitionMode: String as PropType<PageTransitionProps["transitionMode"]>,
|
||||
appear: Boolean,
|
||||
respectReducedMotion: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
keepAlive: {
|
||||
type: [Boolean, Function] as PropType<PageTransitionProps["keepAlive"]>,
|
||||
default: false
|
||||
@@ -227,7 +220,7 @@ onUnmounted(() => {
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@easing: cubic-bezier(.19, 1, .22, 1);
|
||||
@easing: var(--tui-bezier, cubic-bezier(.19, 1, .22, 1));
|
||||
@duration: 520ms;
|
||||
@brightness: .98;
|
||||
@shadow-intensity: .15;
|
||||
@@ -255,8 +248,10 @@ onUnmounted(() => {
|
||||
:deep(.push-left-leave-active),
|
||||
:deep(.push-right-enter-active),
|
||||
:deep(.push-right-leave-active) {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
// 转场期间页面脱离文档流铺满视口,用 inset 让出应用外壳的导航区域
|
||||
inset: var(--tui-transition-inset-top, 0) 0 0 var(--tui-transition-inset-left, 0);
|
||||
width: auto;
|
||||
height: auto;
|
||||
position: fixed;
|
||||
transition: transform @duration @easing, opacity .2s linear;
|
||||
backface-visibility: hidden;
|
||||
|
||||
Reference in New Issue
Block a user