From ac0eeb2c73f94d740acc2b47dfc01922ff108f14 Mon Sep 17 00:00:00 2001 From: wangyawei <1796609990@qq.com> Date: 星期五, 18 四月 2025 14:53:30 +0800 Subject: [PATCH] Merge branch 'master' of http://103.135.160.14:9034/r/NslWeb --- src/views/left/Simulation.vue | 24 +++++++++++++++--------- 1 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/views/left/Simulation.vue b/src/views/left/Simulation.vue index e6df209..3c459ff 100644 --- a/src/views/left/Simulation.vue +++ b/src/views/left/Simulation.vue @@ -1,24 +1,24 @@ <template> <div style="height: 100%"> - <div class="left-top" style="margin-bottom: 20px;"> + <div class="left-top" style="margin-bottom: 20px"> <span>鏂板缓浠跨湡鏂规</span> <span class="clickable-text" @click="goBack">杩斿洖鍒楄〃</span> </div> <el-tabs - style="height: calc(100% - 40px);" + style="height: calc(100% - 40px)" v-model="activeName" type="card" class="demo-tabs" @tab-click="handleClick" > <el-tab-pane label="琛屾斂鍖哄垝浠跨湡" name="first"> - <city-sim :clickValue="clickValue" /> + <city-sim /> </el-tab-pane> <el-tab-pane label="閲嶇偣鍖哄煙浠跨湡" name="second"> - <city-sim :clickValue="clickValue" /> + <city-sim /> </el-tab-pane> <el-tab-pane label="閲嶇偣娌熶豢鐪�" name="third"> - <kg-sim :clickValue="clickValue" /> + <kg-sim /> </el-tab-pane> </el-tabs> </div> @@ -28,6 +28,10 @@ import { ref, defineEmits } from "vue"; import citySim from "./CitySim.vue"; import kgSim from "./KGSim.vue"; + +import { useSimStore } from "@/store/simulation"; + +const simStore = useSimStore(); // 瀹氫箟杩斿洖浜嬩欢 const emits = defineEmits(["back"]); @@ -40,8 +44,7 @@ // 鏍囩鐐瑰嚮浜嬩欢 const handleClick = (tab) => { - clickValue.value = tab.props.label; - console.log(clickValue.value); + simStore.handleClickTab(tab.props.label); }; // 杩斿洖涓婁竴绾� @@ -58,7 +61,7 @@ font-weight: 600; height: 100%; } -/deep/.el-tabs__header{ +/deep/.el-tabs__header { margin: 0px !important; } /deep/ .el-tabs__item.is-active, @@ -77,4 +80,7 @@ font-size: 14px; color: #61f7d4; } -</style> \ No newline at end of file +.el-tab-pane { + height: 100%; +} +</style> -- Gitblit v1.9.3