diff --git a/src/components.d.ts b/src/components.d.ts index 1844f30..408d21a 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -7,14 +7,14 @@ export {} declare module "vue" { export interface GlobalComponents { + BarcodeDraw: (typeof import("./components/barcode-draw/index.vue"))["default"]; CodeView: (typeof import("./components/code-view/index.vue"))["default"]; - DrawBarcode: (typeof import("./components/draw-barcode/index.vue"))["default"]; - DrawQrcode: (typeof import("./components/draw-qrcode/index.vue"))["default"]; ExternalLinkPage: (typeof import("./components/external-link-page/index.vue"))["default"]; FillPage: (typeof import("./components/fill-page/index.vue"))["default"]; InternalLinkPage: (typeof import("./components/internal-link-page/index.vue"))["default"]; LangProvider: (typeof import("./components/lang-provider/index.vue"))["default"]; MainTransition: (typeof import("./components/main-transition/index.vue"))["default"]; + QrcodeDraw: (typeof import("./components/qrcode-draw/index.vue"))["default"]; RouterLink: (typeof import("vue-router"))["RouterLink"]; RouterView: (typeof import("vue-router"))["RouterView"]; SelectIcon: (typeof import("./components/select-icon/index.vue"))["default"]; diff --git a/src/components/draw-barcode/index.vue b/src/components/barcode-draw/index.vue similarity index 100% rename from src/components/draw-barcode/index.vue rename to src/components/barcode-draw/index.vue diff --git a/src/components/draw-qrcode/index.vue b/src/components/qrcode-draw/index.vue similarity index 100% rename from src/components/draw-qrcode/index.vue rename to src/components/qrcode-draw/index.vue diff --git a/src/layout/components/Header/components/Breadcrumb/index.vue b/src/layout/components/Header/components/Breadcrumb/index.vue index 3404b9f..23d3666 100644 --- a/src/layout/components/Header/components/Breadcrumb/index.vue +++ b/src/layout/components/Header/components/Breadcrumb/index.vue @@ -41,7 +41,13 @@ const breadcrumb = computed(() => { // 页面过渡 const transition = computed(() => { - return transitionPage.value === "fadeInOut" ? "fadeInOut-enter-active" : "cardInOut-enter-active"; + if (transitionPage.value === "fadeInOut") { + return "fadeInOut-enter-active"; + } else if (transitionPage.value === "cardInOut") { + return "cardInOut-enter-active"; + } else { + return "fadeOut-enter-active"; + } }); // 面包屑跳转 diff --git a/src/layout/components/Header/components/theme-settings/index.vue b/src/layout/components/Header/components/theme-settings/index.vue index e0d3bc1..9d860f5 100644 --- a/src/layout/components/Header/components/theme-settings/index.vue +++ b/src/layout/components/Header/components/theme-settings/index.vue @@ -42,7 +42,7 @@
页面过渡
- +
@@ -82,7 +82,8 @@ const layoutList = reactive({ const transitions = ref([ { value: "fadeInOut", label: "轻过渡" }, - { value: "cardInOut", label: "卡片" } + { value: "cardInOut", label: "卡片" }, + { value: "fadeOut", label: "消退" } ]); interface IThemeColor { diff --git a/src/style/global-transition.scss b/src/style/global-transition.scss index ba5c194..3515e08 100644 --- a/src/style/global-transition.scss +++ b/src/style/global-transition.scss @@ -75,19 +75,6 @@ } } -@keyframes swing-in-top-fwd { - 0% { - opacity: 0; - transform: rotateX(-100deg); - transform-origin: top; - } - 100% { - opacity: 1; - transform: rotateX(0deg); - transform-origin: top; - } -} - // 离开 .cardInOut-leave-active { animation: swing-out-top-bck 0.25s cubic-bezier(0.6, -0.28, 0.735, 0.045) both; @@ -106,15 +93,31 @@ } } -@keyframes swing-out-top-bck { +/* 淡入淡出 */ +// 进入 +.fadeOut-enter-active { + animation: fade-in 0.25s cubic-bezier(0.39, 0.575, 0.565, 1) both; +} + +@keyframes fade-in { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} + +// 离开 +.fadeOut-leave-active { + animation: fade-out 0.25s ease-out both; +} + +@keyframes fade-out { 0% { opacity: 1; - transform: rotateX(0deg); - transform-origin: top; } 100% { opacity: 0; - transform: rotateX(-100deg); - transform-origin: top; } } diff --git a/src/views/component/barcode/barcode.vue b/src/views/component/barcode/barcode.vue index e1b2dd5..3387e5f 100644 --- a/src/views/component/barcode/barcode.vue +++ b/src/views/component/barcode/barcode.vue @@ -6,14 +6,14 @@
- +
- + diff --git a/src/views/component/draggable/draggable.vue b/src/views/component/draggable/draggable.vue index 074ee30..8de7813 100644 --- a/src/views/component/draggable/draggable.vue +++ b/src/views/component/draggable/draggable.vue @@ -16,7 +16,7 @@