|
|
@@ -1,8 +1,99 @@
|
|
|
<template>
|
|
|
- <div>room</div>
|
|
|
+ <div class="room">
|
|
|
+ <div class="room-title">
|
|
|
+ 你的房间<span>4</span>
|
|
|
+ </div>
|
|
|
+ <div class="room-content">
|
|
|
+ <template
|
|
|
+ v-for="(item, index) in roomList"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ <div class="room-content-item">
|
|
|
+ {{ index }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ <div class="room-bar">
|
|
|
+ <span>创建你的房间</span>
|
|
|
+ <n-button type="warning">
|
|
|
+ 创建
|
|
|
+ </n-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
<script setup lang="ts">
|
|
|
+import { ref } from 'vue'
|
|
|
+
|
|
|
+const roomList = ref([
|
|
|
+ { 1: 1 },
|
|
|
+ { 1: 1 },
|
|
|
+ { 1: 1 },
|
|
|
+ { 1: 1 },
|
|
|
+ { 1: 1 },
|
|
|
+ { 1: 1 },
|
|
|
+ { 1: 1 },
|
|
|
+ { 1: 1 }
|
|
|
+])
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
+.room {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ padding: 40px 4% 0 4%;
|
|
|
+ min-width: 354px;
|
|
|
+ position: relative;
|
|
|
+
|
|
|
+ &-title {
|
|
|
+ font-size: 18px;
|
|
|
+
|
|
|
+ &>span:last-child {
|
|
|
+ font-size: 16px;
|
|
|
+ background: red;
|
|
|
+ border-radius: 10px;
|
|
|
+ margin-left: 10px;
|
|
|
+ padding: 0 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ &-content {
|
|
|
+ margin-top: 20px;
|
|
|
+ padding-bottom: 20px;
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ align-content: flex-start;
|
|
|
+ height: calc(100% - 46px);
|
|
|
+ overflow-y: auto;
|
|
|
+ gap: 20px 3.2%;
|
|
|
+
|
|
|
+ &-item {
|
|
|
+ width: 100%;
|
|
|
+ min-width: 286px;
|
|
|
+ max-width: 300px;
|
|
|
+ height: 180px;
|
|
|
+ background: #40464D;
|
|
|
+ box-shadow: 0px 4px 20px -2px rgba(50, 50, 71, 0.02), 0px 0px 5px 0px rgba(12, 26, 75, 0.04);
|
|
|
+ border-radius: 12px;
|
|
|
+ cursor: pointer;
|
|
|
+ overflow: hidden;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
+ &-bar {
|
|
|
+ width: 70%;
|
|
|
+ position: fixed;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding: 20px 0;
|
|
|
+ bottom: 0;
|
|
|
+ left: 55%;
|
|
|
+ transform: translate(-50%,0);
|
|
|
+ :deep(.n-button) {
|
|
|
+ --n-width: 30%;
|
|
|
+ max-width: 200px;
|
|
|
+ --n-border-radius: 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|