瀏覽代碼

数字角标显示优化

HD_wangm 3 月之前
父節點
當前提交
09d3c68414
共有 3 個文件被更改,包括 31 次插入14 次删除
  1. 6 4
      pages/index/index.uvue
  2. 23 10
      pages/score/index.uvue
  3. 2 0
      pages/worktime/index.uvue

+ 6 - 4
pages/index/index.uvue

@@ -852,7 +852,7 @@
 				width: 100rpx;
 				height: 100rpx;
 				border-radius: 50rpx;
-				position: relative;
+				// position: relative;
 			}
 
 			.db-center-1 { background-color: #DBEAFE; }
@@ -866,12 +866,12 @@
 	}
 
 	.badge {
-		z-index: 999;
-		position: absolute;
+		z-index: 999 !important;
+		position: absolute !important;
 		top: 35rpx;
 		right: 35rpx;
 		background-color: #ff4d4f;
-		border-radius: 40rpx;
+		border-radius: 40rpx !important;
 		min-width: 40rpx;
 		height: 40rpx;
 		display: flex; // 启用 Flexbox 布局
@@ -879,6 +879,8 @@
 		align-items: center;     // 垂直居中
 		box-sizing: border-box;  // 确保 padding 不影响整体尺寸
 		padding: 0 12rpx;
+		overflow: hidden;
+
 		.count {
 			// line-height: 40rpx;
 			font-size: 26rpx;

+ 23 - 10
pages/score/index.uvue

@@ -1303,9 +1303,10 @@
   border-top-left-radius: 30rpx;
   border-top-right-radius: 30rpx;
   padding: 40rpx;
-  padding-bottom: 40rpx;
-  margin-bottom: 150rpx; /* 提高弹窗,避免被底部导航栏遮挡 */
-  min-height: 600rpx;
+  // padding-bottom: 40rpx;
+  // margin-bottom: 150rpx; /* 提高弹窗,避免被底部导航栏遮挡 */
+  min-height: 750rpx;
+  box-sizing: border-box; // 确保padding不撑大容器
 }
 
 .popup-header {
@@ -1313,28 +1314,40 @@
   justify-content: space-between;
   align-items: center;
   margin-bottom: 40rpx;
+  width: 100%;
 }
 
 .popup-title {
-  font-size: 34rpx;
-  font-weight: bold;
+	font-size: 34rpx;
+	font-weight: bold;
+	flex: 1;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
 }
 
 .popup-actions {
   display: flex;
   flex-direction: row;
-  // white-space: nowrap;
+  white-space: nowrap;
+  flex: 0 0 auto;
 }
 
 .popup-btn {
   white-space: nowrap;
+  flex: 0 0 auto; // 不伸缩,保持原有宽度
 }
 
 .cancel-btn {
-  color: #999;
-  padding: 10rpx 20rpx;
-  font-size: 30rpx;
-  font-weight: bold;
+	color: #999;
+	padding: 10rpx 20rpx;
+	font-size: 30rpx;
+	font-weight: bold;
+	// 核心修复:强制文字不换行
+	white-space: nowrap !important;
+    // 可选:固定按钮最小宽度,避免极端情况挤压
+    min-width: 120rpx; 
+	text-align: center;
 }
 
 .confirm-btn {

+ 2 - 0
pages/worktime/index.uvue

@@ -1175,6 +1175,7 @@ onBeforeUnmount(() => {
   padding: 10rpx 20rpx;
   font-size: 30rpx;
   font-weight: bold;
+  white-space: nowrap !important;
 }
 
 .confirm-btn {
@@ -1182,6 +1183,7 @@ color: #165dff;
 padding: 10rpx 20rpx;
 font-size: 30rpx;
 font-weight: bold;
+white-space: nowrap !important;
 }
 
 .date-picker-container {