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;
|
||||
|
||||
@@ -34,8 +34,6 @@ export interface PageTransitionProps {
|
||||
transitionMode?: "out-in" | "in-out";
|
||||
/** 是否在首次渲染时播放过渡。 */
|
||||
appear?: boolean;
|
||||
/** 是否尊重系统的减少动态效果设置,默认开启。 */
|
||||
respectReducedMotion?: boolean;
|
||||
/** 是否缓存页面,也可以按路由决定。默认不缓存。 */
|
||||
keepAlive?: PageTransitionKeepAliveMatcher;
|
||||
/** keep-alive 最多保留的页面数量。 */
|
||||
|
||||
Reference in New Issue
Block a user