From 080ff408e2b954fd1d1f812e51a49c0fc0e42f32 Mon Sep 17 00:00:00 2001 From: wangjuncheng <1> Date: 星期二, 15 四月 2025 14:13:08 +0800 Subject: [PATCH] change --- src/views/left/Simulation.vue | 77 +++++++++++++++++++++----------------- 1 files changed, 43 insertions(+), 34 deletions(-) diff --git a/src/views/left/Simulation.vue b/src/views/left/Simulation.vue index d3238f9..e6df209 100644 --- a/src/views/left/Simulation.vue +++ b/src/views/left/Simulation.vue @@ -1,24 +1,27 @@ <template> - <el-tabs - style="height: 100%" - v-model="activeName" - type="card" - class="demo-tabs" - @tab-click="handleClick" - > - <el-tab-pane label="琛屾斂鍖哄垝浠跨湡" name="first" - ><city-sim :clickValue="clickValue" /> - <!-- ><city-sim :clickValue="clickValue" @start="start" @end="end"/> --> - </el-tab-pane> - <el-tab-pane label="閲嶇偣鍖哄煙浠跨湡" name="second"> - <city-sim :clickValue="clickValue" /> - <!-- <city-sim :clickValue="clickValue" @start="start" @end="end"/> --> - </el-tab-pane> - <el-tab-pane label="閲嶇偣娌熶豢鐪�" name="third"> - <!-- <kg-sim :clickValue="clickValue" @start="start" @end="end" /> --> - <kg-sim :clickValue="clickValue" /> - </el-tab-pane> - </el-tabs> + <div style="height: 100%"> + <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);" + v-model="activeName" + type="card" + class="demo-tabs" + @tab-click="handleClick" + > + <el-tab-pane label="琛屾斂鍖哄垝浠跨湡" name="first"> + <city-sim :clickValue="clickValue" /> + </el-tab-pane> + <el-tab-pane label="閲嶇偣鍖哄煙浠跨湡" name="second"> + <city-sim :clickValue="clickValue" /> + </el-tab-pane> + <el-tab-pane label="閲嶇偣娌熶豢鐪�" name="third"> + <kg-sim :clickValue="clickValue" /> + </el-tab-pane> + </el-tabs> + </div> </template> <script setup> @@ -26,23 +29,25 @@ import citySim from "./CitySim.vue"; import kgSim from "./KGSim.vue"; +// 瀹氫箟杩斿洖浜嬩欢 +const emits = defineEmits(["back"]); + +// 褰撳墠婵�娲荤殑鏍囩椤� const activeName = ref("first"); +// 鐐瑰嚮鍊� const clickValue = ref(""); +// 鏍囩鐐瑰嚮浜嬩欢 const handleClick = (tab) => { clickValue.value = tab.props.label; console.log(clickValue.value); }; -// const emits = defineEmits(["start", "end"]); -// function start() { -// emits("start"); -// console.log("寮�濮嬫ā鎷�"); -// } -// function end() { -// emits("end"); -// } +// 杩斿洖涓婁竴绾� +const goBack = () => { + emits("back", clickValue.value); +}; </script> <style lang="less" scoped> @@ -53,19 +58,23 @@ font-weight: 600; height: 100%; } +/deep/.el-tabs__header{ + margin: 0px !important; +} /deep/ .el-tabs__item.is-active, /deep/ .el-tabs__item:hover { color: #fff; } + /deep/ .el-tabs__item { padding: 0 18px; color: #fff; background-color: #009688; } -// /deep/ .el-tabs__content { -// background-color: #fff; -// } -.el-tab-pane { - height: 100%; +.clickable-text { + margin-left: 85px; + cursor: pointer; + font-size: 14px; + color: #61f7d4; } -</style> +</style> \ No newline at end of file -- Gitblit v1.9.3