| | |
| | | </div> |
| | | <div> |
| | | <label>仿真参数:</label> |
| | | <div style="width: 100%; height: 60px; background-color: #fff;"></div> |
| | | <div style="width: 100%; height: 43px; background-color: #fff;"></div> |
| | | </div> |
| | | </div> |
| | | <div class="buttons"> |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref, computed } from 'vue'; |
| | | import { ref, computed,inject } from 'vue'; |
| | | import { ElMessage } from 'element-plus'; |
| | | import { initeWaterPrimitiveView } from "@/utils/water"; |
| | | |
| | | const emit = defineEmits(["start", "end"]); |
| | | function endPlay() { |
| | | emit("end"); |
| | | } |
| | | const { startSimulate, endSimulate } = inject("simulateActions"); |
| | | |
| | | function startPlay() { |
| | | initeWaterPrimitiveView(); |
| | | emit("start"); |
| | | console.log("开始模拟按钮被点击"); |
| | | console.log("当前选中的区域:", props.selectedArea); |
| | | initeWaterPrimitiveView(); |
| | | startSimulate(); |
| | | } |
| | | // 定义 Props |
| | | const props = defineProps({ |
| | |
| | | const openPlan = () => { |
| | | console.log('打开方案按钮被点击'); |
| | | }; |
| | | |
| | | // 开始模拟 |
| | | const startSimulation = () => { |
| | | console.log('开始模拟按钮被点击'); |
| | | console.log('当前选中的区域:', props.selectedArea); |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | |
| | | |
| | | .buttons { |
| | | margin-top: 10px; |
| | | display: flex; |
| | | gap: 10px; |
| | | } |
| | | |
| | | .el-button { |
| | | flex: 1; |
| | | } |
| | | .input-item { |
| | | display: flex; |
| | | align-items: center; |