添加全局变量

This commit is contained in:
GGJ
2024-10-16 10:49:48 +08:00
parent 376f6cc31b
commit 89535b6059
11 changed files with 57 additions and 40 deletions

View File

@@ -1,5 +1,6 @@
<template>
<div class="default-main">
<!-- <el-button :loading="$allVariables.butLoading ">123</el-button> -->
<el-tabs v-model="activeName" type="border-card">
<el-tab-pane label="终端在线率列表" name="1">
<Table />
@@ -12,7 +13,7 @@
</template>
<script setup lang="ts">
import { onMounted, reactive, ref, provide } from 'vue'
import { onMounted, reactive, ref, getCurrentInstance } from 'vue'
import { mainHeight } from '@/utils/layout'
import Table from './components/table.vue'
@@ -23,6 +24,15 @@ defineOptions({
const activeName = ref('1')
const layout = mainHeight(63) as any
// const { proxy } = getCurrentInstance()
// onMounted(() => {
// setTimeout(() => {
// proxy.$allVariables.butLoading = true
// setTimeout(() => {
// proxy.$allVariables.butLoading = false
// }, 3000);
// }, 3000);
// })
</script>
<style lang="scss" scoped>
@@ -30,6 +40,7 @@ const layout = mainHeight(63) as any
width: 100%;
height: 500px;
}
:deep(.el-tabs__content) {
height: v-bind('layout.height');
overflow-y: auto;