surfaceRunoffInputFlux.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <template>
  2. <div class="runoff-container">
  3. <el-card class="gradient-card" shadow="hover">
  4. <el-row :gutter="20">
  5. <el-col :span="24">
  6. <p class="label">地表径流(g/ha/a)</p>
  7. </el-col>
  8. <el-col :span="24">
  9. <el-input
  10. v-model="runoff"
  11. placeholder="请输入"
  12. class="custom-input"
  13. />
  14. </el-col>
  15. <el-col :span="24" style="margin-top: 20px;">
  16. <el-button class="calculate-btn" @click="onCalculate">计算</el-button>
  17. </el-col>
  18. </el-row>
  19. </el-card>
  20. </div>
  21. </template>
  22. <script setup>
  23. import { ref } from 'vue';
  24. import { ElCard, ElRow, ElCol, ElInput, ElButton } from 'element-plus';
  25. const runoff = ref('0.368');
  26. const onCalculate = () => {
  27. // 暂无计算逻辑,仅作展示
  28. alert('计算按钮已点击');
  29. };
  30. </script>
  31. <style scoped>
  32. .runoff-container {
  33. display: flex;
  34. justify-content: center;
  35. align-items: center;
  36. padding: 20px;
  37. margin-left: 10px; /* 确保输入框靠左对齐 */
  38. }
  39. .gradient-card {
  40. /* 半透明渐变背景 */
  41. background: linear-gradient(
  42. 135deg,
  43. rgba(250, 253, 255, 0.8),
  44. rgba(137, 223, 252, 0.8)
  45. );
  46. border-radius: 12px;
  47. box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  48. padding: 30px;
  49. text-align: left; /* 改为左对齐 */
  50. width: 300px;
  51. backdrop-filter: blur(5px); /* 添加模糊效果增强半透明感 */
  52. border: none;
  53. }
  54. .label {
  55. font-weight: bold;
  56. font-size: 18px;
  57. margin-bottom: 10px; /* 减少底部外边距 */
  58. color: #333;
  59. }
  60. .custom-input {
  61. width: 100%;
  62. max-width: 200px;
  63. margin-left: 10px; /* 确保输入框靠左对齐 */
  64. }
  65. /* 自定义输入框样式 */
  66. :deep(.custom-input .el-input__inner) {
  67. background: rgba(255, 255, 255, 0.7);
  68. border-radius: 8px;
  69. border: 1px solid #dcdfe6;
  70. box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  71. padding: 10px 15px;
  72. font-size: 16px;
  73. }
  74. :deep(.custom-input .el-input__inner:focus) {
  75. border-color: #409EFF;
  76. box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
  77. }
  78. .calculate-btn {
  79. width: 100%;
  80. max-width: 200px;
  81. height: 50px;
  82. border: none;
  83. border-radius: 25px !important;
  84. font-size: 18px;
  85. font-weight: bold;
  86. transition: all 0.4s ease;
  87. /* 渐变背景色 */
  88. background: linear-gradient(to right, #8DF9F0, #26B046);
  89. color: white !important;
  90. /* 按钮整体阴影 */
  91. box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15),
  92. 0 2px 6px rgba(38, 176, 70, 0.3) inset;
  93. }
  94. .calculate-btn:hover {
  95. transform: scale(1.03);
  96. box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2),
  97. 0 2px 8px rgba(38, 176, 70, 0.4) inset;
  98. background: linear-gradient(to right, #7de8df, #20a03d);
  99. }
  100. .calculate-btn:active {
  101. transform: scale(0.98);
  102. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1),
  103. 0 1px 6px rgba(38, 176, 70, 0.4) inset;
  104. }
  105. </style>