Skip to content

Commit ca75d21

Browse files
committed
优化表达式编辑器布局:1. 将变量区域的宽度固定为320px,确保一致性;2. 调整计算器区域的flex占比,提升布局合理性。
-------------------------- [deploy]
1 parent 345cfb0 commit ca75d21

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-expression-editor",
3-
"version": "1.1.2",
3+
"version": "1.1.3",
44
"description": "A powerful Vue 3 mathematical expression editor component",
55
"main": "dist/index.js",
66
"module": "dist/index.mjs",

src/components/styles/layout.scss

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,12 @@
7676
.variables-section {
7777
margin: 0;
7878
height: 350px; // 设置固定最大高度
79-
min-width: 280px; // 设置最小宽度,确保变量区域不会太窄
80-
max-width: 35%; // 限制变量区域的最大宽度
79+
width: 320px; // 固定宽度为320px
80+
min-width: 320px;
81+
max-width: 320px; // 固定最大宽度为320px
8182
padding-right: v.$spacing-xl; // 增加右侧内边距
8283
border-right: 1px solid var(--el-border-color-light); // 添加分隔线
83-
flex: 1;
84+
flex: 0 0 320px; // 使用flex: 0 0 auto确保不会被压缩或拉伸
8485
display: flex;
8586
flex-direction: column;
8687
overflow: hidden; // 确保内容溢出时隐藏
@@ -123,7 +124,7 @@
123124
:deep(.calculator) {
124125
margin-left: v.$spacing-xl; // 增加左侧外边距
125126
min-width: 320px; // 设置最小宽度,确保计算器不会太窄
126-
flex: 2;
127+
flex: 1; // 减小计算器区域的 flex 占比
127128
}
128129
}
129130
}

0 commit comments

Comments
 (0)