2026-03-30 11:05:33 +08:00
|
|
|
<!-- SidePanelItem.vue -->
|
|
|
|
|
<template>
|
|
|
|
|
<div class="rightContentDrawer">
|
2026-03-31 10:14:20 +08:00
|
|
|
<div @click="handleToggle" class="drawerController1" v-if="!drawerOpen">
|
2026-03-30 11:05:33 +08:00
|
|
|
<img src="../../assets/components/arrow-left.png" alt="">
|
|
|
|
|
</div>
|
2026-03-31 10:14:20 +08:00
|
|
|
|
|
|
|
|
<!-- 使用 Vue 的 Transition 组件控制动画 -->
|
|
|
|
|
<transition name="drawer-slide">
|
|
|
|
|
<a-drawer
|
|
|
|
|
:get-container="false"
|
|
|
|
|
:style="{ position: 'relative' }"
|
|
|
|
|
v-model:open="drawerOpen"
|
|
|
|
|
:mask="false"
|
|
|
|
|
placement="right"
|
|
|
|
|
width="450"
|
|
|
|
|
:closable="false"
|
|
|
|
|
:headerStyle="{ color: '#FAFCFE' }">
|
|
|
|
|
<div @click="handleToggle" class="drawerController">
|
|
|
|
|
<img src="../../assets/components/arrow-right.png" alt="">
|
|
|
|
|
</div>
|
|
|
|
|
<div style="padding:16px 16px 0">
|
|
|
|
|
<slot />
|
|
|
|
|
</div>
|
|
|
|
|
</a-drawer>
|
|
|
|
|
</transition>
|
2026-03-30 11:05:33 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
2026-03-27 15:52:43 +08:00
|
|
|
|
2026-03-30 11:05:33 +08:00
|
|
|
<script setup>
|
2026-03-31 10:14:20 +08:00
|
|
|
import { ref, defineOptions } from 'vue';
|
2026-03-27 15:52:43 +08:00
|
|
|
|
2026-03-31 10:14:20 +08:00
|
|
|
// 定义组件名 (便于调试和递归)
|
2026-03-30 11:05:33 +08:00
|
|
|
defineOptions({
|
|
|
|
|
name: 'rightDrawer'
|
|
|
|
|
});
|
|
|
|
|
const drawerOpen = ref(true);
|
2026-03-31 10:14:20 +08:00
|
|
|
|
|
|
|
|
const handleToggle = () => {
|
|
|
|
|
drawerOpen.value = !drawerOpen.value;
|
|
|
|
|
};
|
2026-03-27 15:52:43 +08:00
|
|
|
</script>
|
|
|
|
|
|
2026-03-30 11:05:33 +08:00
|
|
|
<style lang="scss">
|
2026-03-27 15:52:43 +08:00
|
|
|
.rightContentDrawer {
|
|
|
|
|
height: 100%;
|
2026-03-30 11:05:33 +08:00
|
|
|
position: relative;
|
|
|
|
|
box-sizing: border-box;
|
2026-03-27 15:52:43 +08:00
|
|
|
|
2026-03-30 11:05:33 +08:00
|
|
|
.drawerController1 {
|
|
|
|
|
width: 18px;
|
|
|
|
|
position: absolute;
|
2026-03-31 10:14:20 +08:00
|
|
|
right: -2px;
|
2026-03-30 11:05:33 +08:00
|
|
|
cursor: pointer;
|
|
|
|
|
z-index: 10;
|
|
|
|
|
height: 88px;
|
|
|
|
|
line-height: 88px;
|
|
|
|
|
top: 45%;
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
background-image: url(../../assets/components/bg-toggle.e1dabcf3.svg);
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-03-27 15:52:43 +08:00
|
|
|
|
2026-03-31 10:14:20 +08:00
|
|
|
|
2026-03-30 11:05:33 +08:00
|
|
|
.ant-drawer {
|
|
|
|
|
margin: 5px 0px;
|
2026-03-31 10:14:20 +08:00
|
|
|
|
|
|
|
|
.ant-drawer-content{
|
|
|
|
|
overflow:visible;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-30 11:05:33 +08:00
|
|
|
.ant-drawer-content-wrapper {
|
|
|
|
|
border: 2px solid #c5d6e2 !important;
|
|
|
|
|
box-shadow: 3px 3px 3px 9px #e5edf3 !important;
|
|
|
|
|
}
|
2026-03-27 15:52:43 +08:00
|
|
|
|
2026-03-30 11:05:33 +08:00
|
|
|
.ant-drawer-body {
|
|
|
|
|
padding: 0px !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-03-27 15:52:43 +08:00
|
|
|
|
2026-03-30 11:05:33 +08:00
|
|
|
.drawerController {
|
|
|
|
|
width: 18px;
|
|
|
|
|
position: absolute;
|
|
|
|
|
right: 10px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
z-index: 10;
|
|
|
|
|
height: 88px;
|
|
|
|
|
line-height: 88px;
|
|
|
|
|
top: 45%;
|
|
|
|
|
left: -18px;
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
background-image: url(../../assets/components/bg-toggle.e1dabcf3.svg);
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
</style>
|