|
@@ -0,0 +1,95 @@
|
|
|
|
+<template>
|
|
|
|
+ <Transition class="module-left">
|
|
|
|
+ <!-- 正常展示模块时 -->
|
|
|
|
+ <div v-if="visible" class="module-content">
|
|
|
|
+ <div class="module-content__title__expand">
|
|
|
|
+ <span class="action-btn close-btn" @click="closeModel"></span>
|
|
|
|
+ {{ title }}
|
|
|
|
+ </div>
|
|
|
|
+ <div class="module-slot">
|
|
|
|
+ <slot></slot>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- 隐藏模块时 -->
|
|
|
|
+ <!-- <div v-else class="w-100%">
|
|
|
|
+ <div class="module-content__title">
|
|
|
|
+ <span class="action-btn show-btn" @click="showModel"></span>
|
|
|
|
+ {{ title }}
|
|
|
|
+ </div>
|
|
|
|
+ </div> -->
|
|
|
|
+ </Transition>
|
|
|
|
+</template>
|
|
|
|
+<script lang="ts" setup>
|
|
|
|
+ defineProps<{ title: string; visible: boolean }>();
|
|
|
|
+ const emit = defineEmits(['update:visible']);
|
|
|
|
+
|
|
|
|
+ function closeModel() {
|
|
|
|
+ emit('update:visible', false);
|
|
|
|
+ }
|
|
|
|
+</script>
|
|
|
|
+<style lang="less" scoped>
|
|
|
|
+ .module-left {
|
|
|
|
+ --bg-height: 33px;
|
|
|
|
+ color: #fff;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+
|
|
|
|
+ .module-content {
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 100%;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .module-content__title__expand {
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: var(--bg-height);
|
|
|
|
+ background: url('@/assets/images/home-container/configurable/model_original_title_bg.png') no-repeat;
|
|
|
|
+ background-size: 100% 100%;
|
|
|
|
+ position: relative;
|
|
|
|
+ text-align: right;
|
|
|
|
+ padding: 4px 10% 0 0;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // .module-content__title {
|
|
|
|
+ // width: 50%;
|
|
|
|
+ // height: var(--bg-height);
|
|
|
|
+ // background: url('@/assets/images/home-container/configurable/model_left_title_bg.png') no-repeat;
|
|
|
|
+ // background-size: 100% 100%;
|
|
|
|
+ // position: relative;
|
|
|
|
+ // text-align: right;
|
|
|
|
+ // padding: 4px 10% 0 0;
|
|
|
|
+ // }
|
|
|
|
+
|
|
|
|
+ // 固定在父容器右上角的按钮图标
|
|
|
|
+ // .action-btn {
|
|
|
|
+ // width: 18px;
|
|
|
|
+ // height: 18px;
|
|
|
|
+ // background: url('@/assets/images/home-container/configurable/expand.svg') no-repeat center;
|
|
|
|
+ // position: absolute;
|
|
|
|
+ // right: 0;
|
|
|
|
+ // top: 0;
|
|
|
|
+ // }
|
|
|
|
+ // .close-btn {
|
|
|
|
+ // transform: rotate(-90deg);
|
|
|
|
+ // }
|
|
|
|
+
|
|
|
|
+ .module-slot {
|
|
|
|
+ height: calc(100% - 33px);
|
|
|
|
+ width: 100%;
|
|
|
|
+ backdrop-filter: blur(5px);
|
|
|
|
+ background-color: #6ad6ff1c;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // Transition动画相关
|
|
|
|
+ .v-enter-active,
|
|
|
|
+ .v-leave-active {
|
|
|
|
+ transition: all 0.3s ease;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .v-enter-from,
|
|
|
|
+ .v-leave-to {
|
|
|
|
+ // opacity: 1;
|
|
|
|
+ transform: translateX(-100%);
|
|
|
|
+ // transform: scaleY(0);
|
|
|
|
+ // transform-origin: center top;
|
|
|
|
+ }
|
|
|
|
+</style>
|