| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- <template>
- <Transition>
- <div v-if="visible" class="module-content">
- <div v-if="title" class="module-content__title__expand">
- <div>
- <span class="action-btn close-btn" @click="closeModel"></span>
- <span @click="clickHandler">{{ title }}</span>
- </div>
- <span v-if="visibleDetail" class="detail-text" @click="handleClickDetail">详情</span>
- </div>
- <div class="module-slot">
- <slot></slot>
- </div>
- </div>
- </Transition>
- </template>
- <script lang="ts" setup>
- defineProps<{ title: string; visible: boolean,visibleDetail:boolean }>();
- const emit = defineEmits(['close', 'click','handleClickDetail']);
- function closeModel() {
- emit('close');
- }
- function clickHandler() {
- emit('click');
- }
- //详情点击
- function handleClickDetail() {
- emit('handleClickDetail')
- }
- </script>
- <style lang="less" scoped>
- @import '/@/design/theme.less';
- @{theme-deepblue} {
- .module-content {
- --image-model_original_title_bg: url('@/assets/images/themify/deepblue/home-container/configurable/gasInjection/2-5.png');
- --image-model_original_border_bg: url('@/assets/images/themify/deepblue/home-container/configurable/gasInjection/2-6.png');
- }
- }
- .module-content {
- --image-model_original_title_bg: url('@/assets/images/gasInjection/2-5.png');
- --image-model_original_border_bg: url('@/assets/images/gasInjection/2-6.png');
- --bg-height: 40px;
- color: #fff;
- box-sizing: border-box;
- position: absolute;
- width: 100%;
- height: 100%;
- }
- .module-content__title__expand {
- display: flex;
- justify-content: space-between;
- align-items: center;
- width: 100%;
- height: var(--bg-height);
- background: var(--image-model_original_title_bg) no-repeat;
- background-size: 100% 100%;
- position: relative;
- padding-left: 45px;
- padding-right: 24px;
- padding-top: 2px;
- margin-bottom: 5px;
- font-family: 'douyuFont';
- line-height: var(--bg-height);
- }
- .module-slot {
- height: calc(100% - 33px);
- width: calc(100% - 15px);
- background: var( --image-model_original_border_bg) no-repeat;
- background-size: 100% 100%;
- // backdrop-filter: blur(5px);
- // background-color: var(--vent-configurable-original-module-bg);
- // margin-left: 5px;
- }
- .detail-text{
- color: #2cb6ff;
- cursor: pointer;
- }
- // Transition动画相关
- .v-enter-active,
- .v-leave-active {
- transition: all 0.3s ease;
- }
- .v-enter-from,
- .v-leave-to {
- opacity: 0;
- transform: translateY(-33px);
- }
- </style>
|