wangfei
2025-04-16 1b0b34ba7ee93d6cabc850342a9ef4babdaca3f5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<script setup>
import {onBeforeUnmount, onMounted, onUnmounted, reactive, ref} from "vue";
import {useRouter} from "vue-router"
import {host, WebSocketHost} from '@/utils/constants'
import request from "@/utils/request"
import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService';
import {ElMessage, ElMessageBox} from 'element-plus'
import {useI18n} from 'vue-i18n'
const router = useRouter()
const {t} = useI18n()
let language = ref(localStorage.getItem('lang') || 'zh')
// let socket = null;
// const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/edgTasks`;
// const handleMessage = (data) => {
//   tableData.value = data.edgTasks[0]
// };
// onMounted(() => {
//   socket = initializeWebSocket(socketUrl, handleMessage);
// });
//   onUnmounted(() => {
//     if (socket) {
//       closeWebSocket(socket);
//     }
//   });
// onBeforeUnmount(() => {
//   closeWebSocket();
// });
</script>
<template>
  <div style="height: 500px;">
    <div>
      <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" >
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;">
        <div class="block text-center" m="t-4">
    <el-carousel height="550px">
      <!-- <el-carousel trigger="click" height="550px">//鼠标移入时页面不切换,鼠标移走时界面自动滚动 -->
      <el-carousel-item v-for="item in 3" :key="item">
        <h3 class="small justify-center" text="2xl">{{ item }}</h3>
      </el-carousel-item>
    </el-carousel>
  </div>
      </div>
      </el-card>
    </div>
  </div>
</template>
<style scoped>
.demonstration {
  color: var(--el-text-color-secondary);
}
 
.el-carousel__item h3 {
  color: #475669;
  opacity: 0.75;
  line-height: 550px;
  margin: 0;
  text-align: center;
}
 
.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}
 
.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
</style>