Files
vue-desktop/src/core/window/ui/css/wf.scss
2025-09-19 11:49:04 +08:00

102 lines
2.3 KiB
SCSS

*,
*::before,
*::after {
box-sizing: border-box; /* 使用更直观的盒模型 */
margin: 0;
padding: 0;
}
:host {
position: absolute;
top: 0;
left: 0;
display: block;
z-index: 10;
user-select: none;
--titlebar-height: 32px;
--shadow: 0 10px 30px rgba(0,0,0,0.25);
font-family: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}
:host([focused]) {
z-index: 11;
.window {
border-color: #8338ec;
}
}
:host([windowFormState='maximized']) {
.window {
border-radius: 0;
box-shadow: none;
}
}
.window {
position: absolute;
box-shadow: var(--shadow, 0 10px 30px rgba(0,0,0,0.25));
background: linear-gradient(#ffffff, #f6f6f6);
border: 1px solid rgba(0,0,0,0.08);
border-radius: 6px;
overflow: hidden;
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
&.focus {
border-color: #3a86ff;
}
}
.titlebar {
height: var(--titlebar-height);
display: flex;
align-items: center;
padding: 0 8px;
gap: 8px;
background: linear-gradient(#f2f2f2, #e9e9e9);
border-bottom: 1px solid rgba(0,0,0,0.06);
.title {
font-size: 13px;
font-weight: 600;
flex: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: #111;
}
.controls {
display: flex; gap: 6px;
button.ctrl {
width: 34px;
height: 24px;
border: none;
background: transparent;
border-radius: 4px;
cursor: pointer;
font-weight: 600;
font-size: 12px;
&:hover {
background: rgba(0,0,0,0.06);
}
}
}
}
.content { flex: 1; overflow: auto; padding: 12px; background: transparent; }
.resizer { position: absolute; z-index: 20; }
.resizer.t { height: 6px; left: 0; right: 0; top: -3px; cursor: ns-resize; }
.resizer.b { height: 6px; left: 0; right: 0; bottom: -3px; cursor: ns-resize; }
.resizer.r { width: 6px; top: 0; bottom: 0; right: -3px; cursor: ew-resize; }
.resizer.l { width: 6px; top: 0; bottom: 0; left: -3px; cursor: ew-resize; }
.resizer.tr { width: 12px; height: 12px; right: -6px; top: -6px; cursor: nesw-resize; }
.resizer.tl { width: 12px; height: 12px; left: -6px; top: -6px; cursor: nwse-resize; }
.resizer.br { width: 12px; height: 12px; right: -6px; bottom: -6px; cursor: nwse-resize; }
.resizer.bl { width: 12px; height: 12px; left: -6px; bottom: -6px; cursor: nesw-resize; }