|
@@ -0,0 +1,113 @@
|
|
|
|
|
+<template>
|
|
|
|
|
+ <div class="list">
|
|
|
|
|
+ <div class="list-title">
|
|
|
|
|
+ <n-breadcrumb>
|
|
|
|
|
+ <n-breadcrumb-item>
|
|
|
|
|
+ <RouterLink to="/room">
|
|
|
|
|
+ 房间
|
|
|
|
|
+ </RouterLink>
|
|
|
|
|
+ </n-breadcrumb-item>
|
|
|
|
|
+ <n-breadcrumb-item>
|
|
|
|
|
+ 设备:{{ deviceList.length }}
|
|
|
|
|
+ </n-breadcrumb-item>
|
|
|
|
|
+ </n-breadcrumb>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="list-content">
|
|
|
|
|
+ <template
|
|
|
|
|
+ v-for="(item, index) in deviceList"
|
|
|
|
|
+ :key="index"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="list-content-item"
|
|
|
|
|
+ @click="change"
|
|
|
|
|
+ >
|
|
|
|
|
+ <n-image
|
|
|
|
|
+ width="60"
|
|
|
|
|
+ height="60"
|
|
|
|
|
+ :preview-disabled="true"
|
|
|
|
|
+ :src="item.url"
|
|
|
|
|
+ />
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <span>只能等</span>
|
|
|
|
|
+ <n-switch />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+</template>
|
|
|
|
|
+<script setup lang="ts">
|
|
|
|
|
+import { ref } from 'vue'
|
|
|
|
|
+import { useRouter, RouterLink } from 'vue-router'
|
|
|
|
|
+
|
|
|
|
|
+const router = useRouter()
|
|
|
|
|
+const deviceList = ref([
|
|
|
|
|
+ { check: false, url: new URL('./img/3.png', import.meta.url).href },
|
|
|
|
|
+ { check: false, url: new URL('./img/3.png', import.meta.url).href },
|
|
|
|
|
+ { check: false, url: new URL('./img/3.png', import.meta.url).href },
|
|
|
|
|
+ { check: false, url: new URL('./img/3.png', import.meta.url).href },
|
|
|
|
|
+ { check: false, url: new URL('./img/3.png', import.meta.url).href },
|
|
|
|
|
+ { check: false, url: new URL('./img/3.png', import.meta.url).href },
|
|
|
|
|
+ { check: false, url: new URL('./img/3.png', import.meta.url).href },
|
|
|
|
|
+ { check: false, url: new URL('./img/3.png', import.meta.url).href },
|
|
|
|
|
+ { check: false, url: new URL('./img/3.png', import.meta.url).href },
|
|
|
|
|
+ { check: false, url: new URL('./img/3.png', import.meta.url).href },
|
|
|
|
|
+ { check: false, url: new URL('./img/3.png', import.meta.url).href },
|
|
|
|
|
+ { check: false, url: new URL('./img/3.png', import.meta.url).href },
|
|
|
|
|
+ { check: false, url: new URL('./img/3.png', import.meta.url).href },
|
|
|
|
|
+ { check: false, url: new URL('./img/3.png', import.meta.url).href },
|
|
|
|
|
+ { check: false, url: new URL('./img/3.png', import.meta.url).href },
|
|
|
|
|
+ { check: false, url: new URL('./img/3.png', import.meta.url).href },
|
|
|
|
|
+ { check: false, url: new URL('./img/3.png', import.meta.url).href },
|
|
|
|
|
+ { check: false, url: new URL('./img/3.png', import.meta.url).href },
|
|
|
|
|
+ { check: false, url: new URL('./img/3.png', import.meta.url).href }
|
|
|
|
|
+])
|
|
|
|
|
+function change() {
|
|
|
|
|
+ router.push('/detail')
|
|
|
|
|
+}
|
|
|
|
|
+</script>
|
|
|
|
|
+<style lang="scss" scoped>
|
|
|
|
|
+.list {
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ padding: 40px 4% 0 4%;
|
|
|
|
|
+ min-width: 327px;
|
|
|
|
|
+
|
|
|
|
|
+ &-title {
|
|
|
|
|
+ font-size: 18px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ &-content {
|
|
|
|
|
+ margin-top: 20px;
|
|
|
|
|
+ padding-bottom: 20px;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-wrap: wrap;
|
|
|
|
|
+ align-content: flex-start;
|
|
|
|
|
+ height: calc(100% - 47px);
|
|
|
|
|
+ overflow-y: auto;
|
|
|
|
|
+ gap: 15px;
|
|
|
|
|
+
|
|
|
|
|
+ &-item {
|
|
|
|
|
+ /* 增长1 不缩小 基础宽度200px */
|
|
|
|
|
+ flex: 1 0 160px;
|
|
|
|
|
+ padding: 10px 15px;
|
|
|
|
|
+ background: #383d43;
|
|
|
|
|
+ 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;
|
|
|
|
|
+
|
|
|
|
|
+ &:hover {
|
|
|
|
|
+ background-color: rgba(99, 226, 183, 0.15);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ &>div:last-child {
|
|
|
|
|
+ margin-top: 5px;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+</style>
|