Kaynağa Gözat

提交租户名称自适应位置

丸子 10 ay önce
ebeveyn
işleme
e3e301532f
1 değiştirilmiş dosya ile 18 ekleme ve 12 silme
  1. 18 12
      src/components/HomePage.vue

+ 18 - 12
src/components/HomePage.vue

@@ -369,18 +369,26 @@ window.updateTenantName = (newName) => {
 
 .left-box {
   position: relative;
-  justify-content: space-between;
-  align-items: flex-start;
-  flex: 1; // 设置左侧盒子占比为 2
-  // background-color: #fff;
+  justify-content: flex-start;
+  align-items: center;
+  display: flex;
+  flex: 1;
+  padding-left: rpx(30);
 }
 
 .left-box span {
-  position: absolute;
-  margin-top: rpx(20); // 调整上边距离
-  margin-left: rpx(30);
-  font-size: rpx(11); // 默认字体大小
+  position: static;
+  margin-top: 0;
+  margin-left: 0;
+  margin-right: rpx(10); // 与下拉菜单之间的间距
+  font-size: rpx(11);
   color: white;
+  max-width: rpx(200); // 最大宽度限制
+  // overflow: hidden;
+  // text-overflow: ellipsis;
+  white-space: normal; // 允许换行
+  line-height: rpx(16); // 行高
+  text-align: left;
 }
 
 .right-box {
@@ -416,12 +424,10 @@ window.updateTenantName = (newName) => {
   box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
 }
 .dropdown-box {
-  flex: 1;
   align-items: center; // 垂直居中;
-  margin-top: rpx(22);
+  margin-top: 0;
+  display: flex;
 }
-
-
 .dropdown-box .el-button {
   width: rpx(60); // 设置按钮宽度;
   height: rpx(15); // 设置按钮高度;