修改已选组件显示问题

v1.0.0
于肖磊 2024-08-30 18:48:27 +08:00
parent 96157a7cc2
commit 272ece99cb
6 changed files with 15 additions and 9 deletions

View File

@ -196,7 +196,7 @@ const replace_data = () => {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
@media screen and (max-width: 1540px) { @media screen and (max-width: 1560px) {
.settings { .settings {
width: 40rem; width: 40rem;
} }

View File

@ -144,7 +144,7 @@ onUnmounted(() => {
}); });
const handleResize = () => { const handleResize = () => {
if (window.innerWidth <= 1540) { if (window.innerWidth <= 1560) {
cubeWidth.value = 330; cubeWidth.value = 330;
cubeHeight.value = 330; cubeHeight.value = 330;
} else { } else {

View File

@ -105,7 +105,7 @@ onUnmounted(() => {
}); });
const handleResize = () => { const handleResize = () => {
if (window.innerWidth <= 1540) { if (window.innerWidth <= 1560) {
cubeWidth.value = 330; cubeWidth.value = 330;
cubeHeight.value = 330; cubeHeight.value = 330;
} else { } else {

View File

@ -38,10 +38,13 @@
display: none; display: none;
} }
} }
@media screen and (max-width: 1540px) { @media screen and (max-width: 1560px) {
.siderbar { .siderbar {
width: 32rem; width: 32rem;
} }
.drawer-container {
display: none;
}
} }
.main { .main {
flex: 1; flex: 1;
@ -247,15 +250,18 @@
.drawer-container { .drawer-container {
position: relative; position: relative;
overflow: hidden; overflow: hidden;
width: 12.8rem;
margin-left: 0.1rem; margin-left: 0.1rem;
transition: 0.8s ease;
.drawer-content { .drawer-content {
position: absolute; position: absolute;
top: 0; top: 0;
width: 12.8rem; width: 12.8rem;
height: 100%; height: 100%;
background: #fff; background: #fff;
transition: left 0.5s ease; transition: left 0.8s ease;
}
.drawer-title {
transition: 0.4s ease;
} }
.drawer-drag-bg { .drawer-drag-bg {
background: #F2F8FF; background: #F2F8FF;

View File

@ -15,9 +15,9 @@
</el-collapse-item> </el-collapse-item>
</el-collapse> </el-collapse>
</div> </div>
<div class="drawer-container"> <div class="drawer-container" :style="`width: ${ diy_data.length > 0 ? '12.8rem' : '0px' }`">
<div class="drawer-content" :style="{ left: diy_data.length > 0 ? '0' : '-100%' }"> <div class="drawer-content" :style="{ left: diy_data.length > 0 ? '0' : '-100%' }">
<div class="size-14 cr-3 fw ptb-20 pl-12">已选组件({{ diy_data.length }})</div> <div class="size-14 cr-3 fw ptb-20 pl-12 drawer-title" :style="{ opacity: diy_data.length > 0 ? '1' : '0' }">已选组件({{ diy_data.length }})</div>
<div ref="left_scrollTop" class="drawer-drag-area"> <div ref="left_scrollTop" class="drawer-drag-area">
<VueDraggable v-model="diy_data" :animation="500" target=".sort-target" :scroll="true" :on-sort="on_sort"> <VueDraggable v-model="diy_data" :animation="500" target=".sort-target" :scroll="true" :on-sort="on_sort">
<TransitionGroup type="transition" tag="ul" name="fade" class="sort-target flex-col"> <TransitionGroup type="transition" tag="ul" name="fade" class="sort-target flex-col">

View File

@ -151,7 +151,7 @@ const radio = ref('1'); // 创建一个响应式的数字变量初始值为0
background-color: #fff; background-color: #fff;
} }
} }
@media screen and (max-width: 1540px) { @media screen and (max-width: 1560px) {
.settings { .settings {
width: 40rem; width: 40rem;
} }