Parcourir la source

添加 cl-select-seat 选座组件

icssoa il y a 2 mois
Parent
commit
814abedfb3
1 fichiers modifiés avec 9 ajouts et 2 suppressions
  1. 9 2
      pages/demo/other/select-seat.uvue

+ 9 - 2
pages/demo/other/select-seat.uvue

@@ -64,9 +64,14 @@
 				>今日 01月10日 14:20 - 16:16 国语 2D</cl-text
 			>
 
-			<scroll-view direction="horizontal" class="flex flex-row" :show-scrollbar="false">
+			<scroll-view
+				direction="horizontal"
+				class="flex flex-row h-[80rpx]"
+				:show-scrollbar="false"
+				v-if="selectedSeats.length > 0"
+			>
 				<view
-					class="flex p-3 bg-surface-100 dark:!bg-surface-800 rounded-lg mr-2 mb-2"
+					class="flex p-3 bg-surface-100 dark:!bg-surface-800 rounded-lg mr-2 mb-2 h-full items-center justify-center"
 					v-for="(item, index) in selectedSeats"
 					:key="index"
 				>
@@ -163,6 +168,8 @@ const selectedSeats = computed<string[]>(() => {
 		return [];
 	}
 
+	console.log(selected.value.map((s) => `${s.row + 1}排${s.col + 1}座`));
+
 	return selected.value.map((s) => `${s.row + 1}排${s.col + 1}座`);
 });