feat(screen): 为可折叠面板主体添加背景图片

使用 CSS `border-image` 为可折叠面板主体添加九宫格背景,以增强视觉设计。伪元素确保背景位于内容下方,不干扰交互。调整了内边距和定位以适应新的背景图层。
This commit is contained in:
Zzc 2025-11-17 17:56:47 +08:00
parent ba76292c53
commit bc53d875b3

View File

@ -207,12 +207,31 @@ function onAfterLeave(el) {
} }
&__body { &__body {
position: relative;
overflow: hidden; overflow: hidden;
transition: height 0.3s ease; transition: height 0.3s ease;
// 使
&::before {
content: '';
position: absolute;
inset: 0;
border-style: solid;
border-width: vh(25) vw(30);
border-image-source: url('../../assets/images/面板bg.png');
border-image-slice: 25 30 25 30 fill;
border-image-width: vh(25) vw(30);
border-image-repeat: stretch;
box-sizing: border-box;
pointer-events: none; //
z-index: -1; //
}
} }
&__content { &__content {
padding: vh(12) vw(5) vh(20); position: relative;
padding: vh(5) vw(20) vh(15); //
z-index: 1;
// //
&.scrollable { &.scrollable {
@ -226,6 +245,7 @@ function onAfterLeave(el) {
&--collapsed { &--collapsed {
.collapsible-panel__body { .collapsible-panel__body {
height: 0; height: 0;
border-width: 0; // border
} }
} }
} }