| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- <template>
- <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 {
- height: 100%;
- padding: 40px 4% 0 4%;
- min-width: 327px;
- &-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% - 86px);
- overflow-y: auto;
- gap: 15px;
- &-item {
- /* 增长1 不缩小 基础宽度200px */
- flex: 1 0 286px;
- max-width: 100%;
- 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: 100%;
- height: 40px;
- display: flex;
- align-items: center;
- justify-content: space-between;
- :deep(.n-button) {
- --n-width: 30%;
- max-width: 200px;
- --n-border-radius: 10px;
- }
- }
- }
- </style>
|