<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>
|