<template> <!-- 降雨预报 --> <div class="rainFuturePage"> <div class="centerCont flex"> <p class="title">降雨预报</p> <el-progress :stroke-width="20" :percentage="processVal" status="success" :text-inside="true"></el-progress> <el-button type="warning" @click="startImitate" v-if="ifStart" :disabled="isdisabled">开始</el-button> <el-button type="warning" @click="stopImitate" v-else :disabled="isdisabled">暂停</el-button> </div> </div> </template> <script setup> const { proxy } = getCurrentInstance(); const processVal = ref(0); const ifStart = ref(true); const isdisabled = ref(false); // 开始 function startImitate() {} // 暂停 function stopImitate() {} onMounted(() => {}); </script> <style lang="scss" scoped> .rainFuturePage { width: 100%; padding: 20px; .centerCont { justify-content: space-around; } } </style>