|
@@ -7,9 +7,15 @@
|
|
|
</span>
|
|
|
</div>
|
|
|
<div class="content">
|
|
|
- <div class="sign" v-for="scene in sceneList" :key="scene.id" @click="emit('changeScene', scene)" :class="{active: currentScene === scene}">
|
|
|
+ <div
|
|
|
+ class="sign"
|
|
|
+ v-for="scene in sceneList"
|
|
|
+ :key="scene.id"
|
|
|
+ @click="emit('changeScene', scene)"
|
|
|
+ :class="{ active: currentScene === scene }"
|
|
|
+ >
|
|
|
<div class="info">
|
|
|
- <img :src="scene.thumb">
|
|
|
+ <img :src="scene.thumb" />
|
|
|
<p>{{ scene.sceneName }}</p>
|
|
|
</div>
|
|
|
<span class="icon">
|
|
@@ -20,18 +26,21 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
-<script setup>
|
|
|
-import { sceneList } from '@/store/room'
|
|
|
-import Icon from '@/components/icon/index.vue'
|
|
|
-import { currentScene } from '@/store/room'
|
|
|
+<script lang="ts" setup>
|
|
|
+import { unref } from "vue";
|
|
|
+import Icon from "/@/components/basic/icon/index.vue";
|
|
|
+import { useRoom } from "/@/hooks/useRoom";
|
|
|
+// import { currentScene } from "@/store/room";
|
|
|
+const { currentScene, sceneList } = useRoom();
|
|
|
+console.log("sceneList", unref(sceneList));
|
|
|
|
|
|
-const emit = defineEmits(['close', 'changeScene']);
|
|
|
+const emit = defineEmits(["close", "changeScene"]);
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
.scene-list {
|
|
|
max-height: 80%;
|
|
|
- background: rgba(0,0,0,0.8);
|
|
|
+ background: rgba(0, 0, 0, 0.8);
|
|
|
border-radius: 10px 10px 0px 0px;
|
|
|
bottom: 0;
|
|
|
left: 0;
|
|
@@ -47,12 +56,12 @@ const emit = defineEmits(['close', 'changeScene']);
|
|
|
text-align: center;
|
|
|
height: 46px;
|
|
|
line-height: 46px;
|
|
|
- border-bottom: 1px solid rgba(255,255,255,.1);
|
|
|
+ border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
|
|
|
|
|
p {
|
|
|
font-size: 16px;
|
|
|
font-weight: 500;
|
|
|
- color: #FFFFFF;
|
|
|
+ color: #ffffff;
|
|
|
}
|
|
|
|
|
|
.icon {
|
|
@@ -91,7 +100,7 @@ const emit = defineEmits(['close', 'changeScene']);
|
|
|
p {
|
|
|
font-size: 14px;
|
|
|
font-weight: 400;
|
|
|
- color: #FFFFFF;
|
|
|
+ color: #ffffff;
|
|
|
line-height: 20px;
|
|
|
margin-left: 10px;
|
|
|
}
|
|
@@ -108,4 +117,4 @@ const emit = defineEmits(['close', 'changeScene']);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|