feat:更新画板工具栏显示问题

This commit is contained in:
leilei
2025-10-21 11:26:12 +08:00
parent e0001ba430
commit 2b8e7349e6
4 changed files with 13 additions and 15 deletions

View File

@@ -99,8 +99,6 @@ function initWhiteboard() {
WhiteboardSync.init(canvas.value, roomUid);
}
onMounted(async () => {
try {
showLogin.value = false;
@@ -121,7 +119,6 @@ onUnmounted(() => {
});
</script>
<style scoped>
/* 外层容器全屏居中 */
.wrapper-content {
@@ -131,7 +128,7 @@ onUnmounted(() => {
width: 100%;
height: 100%;
background: #fff;
position: relative;
position: relative; /* 关键:为绝对定位子元素提供参照 */
}
/* 登录按钮容器居中 */
@@ -145,12 +142,12 @@ onUnmounted(() => {
.whiteboard-wrapper {
position: relative;
width: 72vw;
height: 69vh; /* 或者适当的高度 */
height: 69vh;
box-sizing: border-box;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
overflow: hidden;
}
/* 画布占满白板容器 */
@@ -160,11 +157,11 @@ onUnmounted(() => {
display: block;
}
/* 工具栏左侧垂直居中 */
/* 工具栏固定在 wrapper-content 内 */
.toolbox {
position: absolute;
top: 50%;
left: 2vw;
left: 40px; /* 距离左侧的间距 */
transform: translateY(-50%);
z-index: 1000;
}