DataStatistics数据显示页面---test.vue中测试全局弹窗提示

This commit is contained in:
龚皓
2024-11-14 16:07:42 +08:00
parent a2234922c8
commit fd75d299ec
24 changed files with 3637 additions and 1582 deletions

View File

@@ -1,17 +1,23 @@
<template>
<div class="settings-container">
<el-row class="popup-row">
<el-checkbox v-model="isPopupEnabled" @change="handleCheckboxChange">
<el-checkbox v-model="isPopupEnabled" @change="handleCheckboxChange" style="color: aliceblue;">
开启弹窗
</el-checkbox>
</el-row>
<el-row class="channel-row">
<Channel/>
</el-row>
</div>
</template>
<script lang="ts" setup>
import { ref, inject, onMounted } from 'vue';
import { ElMessageBox, ElMessage } from 'element-plus';
import type { GlobalWebSocket } from '../utils/useGlobalWebSocket'; // 引入类型
import type { GlobalWebSocket } from '../utils/useGlobalWebSocket';
import Channel from '@/components/Channel.vue';
const isPopupEnabled = ref(false); // 控制弹窗状态
const globalWebSocket = inject<GlobalWebSocket>('globalWebSocket'); // 指定类型
@@ -61,9 +67,30 @@ const handleCheckboxChange = () => {
<style scoped>
.settings-container {
padding: 20px;
display: flex;
flex-direction: column;
background-color: #ffffff;
width: 100%;
height: 100%;
}
.popup-row {
margin-bottom: 20px;
height: 20vh;
width: 80vw;
padding: 1vh 1vw;
margin: 1vh 2vw;
background-color: #001529;
border-radius: 8px;
color: white;
}
.channel-row{
margin: 1vh 2vw;
width: 80vw;
height: 70vh;
background-color: #001529;
border-radius: 8px;
}
</style>