更新数据
This commit is contained in:
35
src/views/home/dialog/leftDialog.vue
Normal file
35
src/views/home/dialog/leftDialog.vue
Normal file
@ -0,0 +1,35 @@
|
||||
<template>
|
||||
<div class="noScollLine">
|
||||
<!-- 预警信息弹框 -->
|
||||
<Home_YJ v-if="isShow.showYj" :show="isShow.showYj" :data="list.yjxqInfo" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { qcckPost, qcckGet } from "@/api/qcckApi.js";
|
||||
import emitter from "@/utils/eventBus.js";
|
||||
import Home_YJ from "./components/home_yj.vue";
|
||||
import { ref, onMounted, onUnmounted, reactive, getCurrentInstance } from "vue";
|
||||
const { proxy } = getCurrentInstance();
|
||||
const isShow = ref({
|
||||
showYj: false, //预警弹窗
|
||||
});
|
||||
const list = reactive({
|
||||
Info_YJ: [], //预警数据
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
// 展示预警
|
||||
emitter.on("showHomeYJ", (res) => {
|
||||
isShow.value.showYj = res ? true : false;
|
||||
console.log(res,'====');
|
||||
// if (res) list.Info_YJ = res;
|
||||
});
|
||||
});
|
||||
onUnmounted(() => {
|
||||
emitter.off("showHomeYJ");
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
Reference in New Issue
Block a user