2026-03-30 11:05:33 +08:00
|
|
|
<!-- SidePanelItem.vue -->
|
|
|
|
|
<template>
|
|
|
|
|
<div class="rightContentDrawer">
|
2026-04-02 08:56:49 +08:00
|
|
|
<div @click="handleToggle" class="drawerController1" v-if="!uiStore.drawerOpen">
|
|
|
|
|
<img src="../../assets/components/arrow-left.png" alt="" />
|
2026-03-30 11:05:33 +08:00
|
|
|
</div>
|
2026-04-02 08:56:49 +08:00
|
|
|
|
2026-03-31 10:14:20 +08:00
|
|
|
<!-- 使用 Vue 的 Transition 组件控制动画 -->
|
|
|
|
|
<transition name="drawer-slide">
|
2026-04-02 08:56:49 +08:00
|
|
|
<a-drawer
|
2026-03-31 10:14:20 +08:00
|
|
|
:get-container="false"
|
2026-04-02 08:56:49 +08:00
|
|
|
:style="{ position: 'relative' }"
|
|
|
|
|
v-model:open="uiStore.drawerOpen"
|
|
|
|
|
:mask="false"
|
|
|
|
|
placement="right"
|
|
|
|
|
width="450"
|
2026-03-31 10:14:20 +08:00
|
|
|
:closable="false"
|
2026-04-02 08:56:49 +08:00
|
|
|
:headerStyle="{ color: '#FAFCFE' }"
|
|
|
|
|
>
|
2026-03-31 10:14:20 +08:00
|
|
|
<div @click="handleToggle" class="drawerController">
|
2026-04-02 08:56:49 +08:00
|
|
|
<img src="../../assets/components/arrow-right.png" alt="" />
|
2026-03-31 10:14:20 +08:00
|
|
|
</div>
|
2026-03-31 17:26:16 +08:00
|
|
|
<div style="padding:16px 8px 0;" class="text_she">
|
2026-03-31 10:14:20 +08:00
|
|
|
<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-04-02 08:56:49 +08:00
|
|
|
import { ref, defineOptions, watch } from "vue";
|
|
|
|
|
import { useUiStore } from "@/store/modules/ui";
|
|
|
|
|
import { set } from "nprogress";
|
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({
|
2026-04-02 08:56:49 +08:00
|
|
|
name: "rightDrawer",
|
2026-03-30 11:05:33 +08:00
|
|
|
});
|
2026-04-02 08:56:49 +08:00
|
|
|
|
|
|
|
|
const uiStore = useUiStore();
|
2026-03-31 10:14:20 +08:00
|
|
|
|
|
|
|
|
const handleToggle = () => {
|
2026-04-02 08:56:49 +08:00
|
|
|
uiStore.toggleDrawer()
|
2026-03-31 10:14:20 +08:00
|
|
|
};
|
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-30 11:05:33 +08:00
|
|
|
.ant-drawer {
|
|
|
|
|
margin: 5px 0px;
|
2026-04-02 08:56:49 +08:00
|
|
|
|
|
|
|
|
.ant-drawer-content {
|
|
|
|
|
overflow: visible;
|
2026-03-31 10:14:20 +08:00
|
|
|
}
|
2026-04-02 08:56:49 +08:00
|
|
|
|
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;
|
2026-04-02 08:56:49 +08:00
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
2026-03-30 11:05:33 +08:00
|
|
|
}
|
2026-03-31 17:26:16 +08:00
|
|
|
.text_she{
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
color:#262626;
|
|
|
|
|
font-variant: tabular-nums;
|
|
|
|
|
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
|
|
|
|
|
}
|
2026-04-02 08:56:49 +08:00
|
|
|
</style>
|