| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- <template>
- <div class="runoff-container">
- <el-card class="gradient-card" shadow="hover">
- <el-row :gutter="20">
- <el-col :span="24">
- <p class="label">地表径流(g/ha/a)</p>
- </el-col>
- <el-col :span="24">
- <el-input
- v-model="runoff"
- placeholder="请输入"
- class="custom-input"
- />
- </el-col>
- <el-col :span="24" style="margin-top: 20px;">
- <el-button class="calculate-btn" @click="onCalculate">计算</el-button>
- </el-col>
- </el-row>
- </el-card>
- </div>
- </template>
- <script setup>
- import { ref } from 'vue';
- import { ElCard, ElRow, ElCol, ElInput, ElButton } from 'element-plus';
- const runoff = ref('0.368');
- const onCalculate = () => {
- // 暂无计算逻辑,仅作展示
- alert('计算按钮已点击');
- };
- </script>
- <style scoped>
- .runoff-container {
- display: flex;
- justify-content: center;
- align-items: center;
- padding: 20px;
- margin-left: 10px; /* 确保输入框靠左对齐 */
- }
- .gradient-card {
- /* 半透明渐变背景 */
- background: linear-gradient(
- 135deg,
- rgba(250, 253, 255, 0.8),
- rgba(137, 223, 252, 0.8)
- );
- border-radius: 12px;
- box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
- padding: 30px;
- text-align: left; /* 改为左对齐 */
- width: 300px;
- backdrop-filter: blur(5px); /* 添加模糊效果增强半透明感 */
- border: none;
- }
- .label {
- font-weight: bold;
- font-size: 18px;
- margin-bottom: 10px; /* 减少底部外边距 */
- color: #333;
- }
- .custom-input {
- width: 100%;
- max-width: 200px;
- margin-left: 10px; /* 确保输入框靠左对齐 */
- }
- /* 自定义输入框样式 */
- :deep(.custom-input .el-input__inner) {
- background: rgba(255, 255, 255, 0.7);
- border-radius: 8px;
- border: 1px solid #dcdfe6;
- box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
- padding: 10px 15px;
- font-size: 16px;
- }
- :deep(.custom-input .el-input__inner:focus) {
- border-color: #409EFF;
- box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
- }
- .calculate-btn {
- width: 100%;
- max-width: 200px;
- height: 50px;
- border: none;
- border-radius: 25px !important;
- font-size: 18px;
- font-weight: bold;
- transition: all 0.4s ease;
-
- /* 渐变背景色 */
- background: linear-gradient(to right, #8DF9F0, #26B046);
- color: white !important;
- /* 按钮整体阴影 */
- box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15),
- 0 2px 6px rgba(38, 176, 70, 0.3) inset;
- }
- .calculate-btn:hover {
- transform: scale(1.03);
- box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2),
- 0 2px 8px rgba(38, 176, 70, 0.4) inset;
- background: linear-gradient(to right, #7de8df, #20a03d);
- }
- .calculate-btn:active {
- transform: scale(0.98);
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1),
- 0 1px 6px rgba(38, 176, 70, 0.4) inset;
- }
- </style>
|