KELECHUAN 3 years ago
parent
commit
bc5482b085
1 changed files with 79 additions and 16 deletions
  1. 79 16
      pages/homework/homework.vue

+ 79 - 16
pages/homework/homework.vue

@@ -65,16 +65,15 @@
 							<view class="t-icon t-icon-daiban"></view>
 							<view class="item-text">{{item.detail.title}}</view>
 						</view>
-						<u-list>
-							<u-list-item>
-								<u-cell :title="`列表长度-${index + 1}`"></u-cell>
-								<u-cell :title="`列表长度-${index + 1}`"></u-cell>
-								<u-cell :title="`列表长度-${index + 1}`"></u-cell>
-								<u-cell :title="`列表长度-${index + 1}`"></u-cell>
-								<u-cell :title="`列表长度-${index + 1}`"></u-cell>
-								<u-cell :title="`列表长度-${index + 1}`"></u-cell>
-							</u-list-item>
-						</u-list>
+						<u-swipe-action v-for="(msg,i) in item.detail.data" :key="i">
+							<u-swipe-action-item :options="options1">
+								<view class="swipe-action u-border-top u-border-bottom">
+									<view class="swipe-action__content">
+										<text class="swipe-action__content__text">{{msg.name}}</text>
+									</view>
+								</view>
+							</u-swipe-action-item>
+						</u-swipe-action>
 					</view>
 				</view>
 
@@ -120,7 +119,19 @@
 					image: 'https://ouch-cdn2.icons8.com/gpV8ZT40juL5H5uR0cv7ptJaV0vbUu64ANLmkch6cr4/rs:fit:1289:912/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9zdmcvNTE3/L2M0Zjg4MDUzLTMx/ZDUtNDlhZS05M2Nj/LWU4YWM3YTNjODAx/My5zdmc.png',
 					detail: {
 						nav: '评测信息',
-						title: '评测列表'
+						title: '评测列表',
+						data: [{
+								name: '评测数据1'
+							}, {
+								name: '评测数据2'
+							}, {
+								name: '评测数据3'
+							}, {
+								name: '评测数据4'
+							}, {
+								name: '评测数据5'
+							}
+						]
 					}
 				}, {
 					title: '今日作业数:' + '\xa0\xa0\xa0',
@@ -132,7 +143,15 @@
 					image: 'https://ouch-cdn2.icons8.com/XuAMXajgkDqsOY7cp6uY1LQivtTxahNZjWM1Qk2bfoY/rs:fit:1216:912/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9zdmcvMzE4/LzdjYTU2NDM4LTc4/MTktNDVhNi1hMjZh/LTMyZWE5NDE4YzI5/My5zdmc.png',
 					detail: {
 						nav: '作业信息',
-						title: '作业列表'
+						title: '作业列表',
+						data: [{
+								name: '作业数据1'
+							}, {
+								name: '作业数据2'
+							}, {
+								name: '作业数据3'
+							}
+						]
 					}
 				}, {
 					title: '今日活动数:' + '\xa0\xa0\xa0',
@@ -144,7 +163,21 @@
 					image: 'https://ouch-cdn2.icons8.com/xrmiKHmKAqKegMFWYXXUHk6mqTXXTqoU0wsTFULoboQ/rs:fit:1002:912/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9zdmcvNzcy/LzczYWVmZjhkLTk4/N2ItNDI2Ny04NmNk/LTA1NTI4YjhiMTIw/Ni5zdmc.png',
 					detail: {
 						nav: '活动信息',
-						title: '活动列表'
+						title: '活动列表',
+						data: [{
+								name: '活动数据1'
+							}, {
+								name: '活动数据2'
+							}, {
+								name: '活动数据3'
+							}, {
+								name: '活动数据4'
+							}, {
+								name: '活动数据5'
+							}, {
+								name: '活动数据6'
+							}
+						]
 					}
 				}],
 				//历史数据
@@ -153,7 +186,17 @@
 					homework: [10, 29, 38, 60, 50],
 					activity: [70, 19, 28, 40, 60]
 				},
-
+				options1: [{
+					text: '待办',
+					style: {
+						backgroundColor: '#3c9cff'
+					}
+				}, {
+					text: '删除',
+					style: {
+						backgroundColor: '#f56c6c'
+					}
+				}],
 			};
 		},
 		onLoad() {
@@ -219,7 +262,7 @@
 			display: flex;
 			justify-content: space-around;
 			margin: 20rpx auto 20rpx auto;
-			height: 260rpx;
+			height: 250rpx;
 			width: 96%;
 			// background: linear-gradient(to right, #ff95007a,#ff8419);
 			border-radius: $card-border-radius;
@@ -233,7 +276,7 @@
 
 			.card-subtitle {
 				margin: 10rpx 20rpx;
-				font-size: 32rpx;
+				font-size: 30rpx;
 				font-weight: bold;
 				color: #FFF;
 			}
@@ -305,4 +348,24 @@
 		width: 110rpx;
 		height: 110rpx;
 	}
+
+	.u-page {
+		padding: 0;
+	}
+
+	.u-demo-block__title {
+		padding: 10px 0 2px 15px;
+	}
+
+	.swipe-action {
+		&__content {
+			padding: 25rpx 0;
+
+			&__text {
+				font-size: 15px;
+				color: $u-main-color;
+				padding-left: 30rpx;
+			}
+		}
+	}
 </style>