丸子 6 miesięcy temu
rodzic
commit
d5846fb3fb

+ 1 - 1
src/views/AIGeneralCourse.vue

@@ -139,7 +139,7 @@
 </template>
 
 <script setup>
-import { ref, onMounted, computed, watch } from 'vue'
+import { ref, onMounted, computed, watch, onBeforeUnmount } from 'vue'
 
 import { ClassList, ClassOutline,ClassOutlineSc } from '@/api/class.js'
 //  Element Plus 组件引入

+ 1 - 1
src/views/block/Blockly.vue

@@ -16,7 +16,7 @@
         <div class="bar bar-1"></div>
         <div class="bar bar-2"></div>
         <div class="bar bar-3"></div>
-        <div class="bar bar-4"></div>
+        <div class="bar bar-4"></div> 
         <div class="bar bar-5"></div>
         <div class="bar bar-6"></div>
         <div class="bar bar-7"></div>

+ 10 - 6
src/views/virtuallaboratory/index.vue

@@ -33,9 +33,10 @@
 
       <!-- 内容区域 -->
        <div class="content-box">
-        <div @click="handleLabClick(item)" v-for="(item, index) in laboratoryList" :key="index" class="small-box">
+        <div  v-for="(item, index) in laboratoryList" :key="index" class="small-box">
            <div
              class="nested-box"
+             @click="handleLabClick(item)"
              :style="{
                backgroundImage: `url(${item.image})`,
                backgroundSize: 'cover'
@@ -116,10 +117,7 @@ const fetchLaboratoryList = async () => {
   }
 };
 
-// 组件挂载时获取数据
-onMounted(() => {
-  fetchLaboratoryList();
-});
+
 
 const handleLabClick = (item) => {
   try {
@@ -141,6 +139,12 @@ const handleLabClick = (item) => {
     window.location.reload();
   }
 }
+
+// 组件挂载时获取数据
+onMounted(() => {
+  fetchLaboratoryList();
+});
+
 </script>
 
 <style scoped lang="scss">
@@ -258,7 +262,6 @@ const handleLabClick = (item) => {
   align-items: center;
   color: black;
   font-size: rpx(8);
-  cursor: pointer; // 鼠标指针样式
 }
 .nested-box {
   width: rpx(150);
@@ -269,6 +272,7 @@ const handleLabClick = (item) => {
   border: 1px solid white; // 添加边框;
   justify-content: center;
   align-items: center;
+  cursor: pointer; // 鼠标指针样式
 }
 .nested-box:hover,
 .nested-box:active {