fee.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <template>
  2. <van-row align="center" justify="center" class="popup_title">
  3. <van-col>{{ feeInfo.popupTitle }}</van-col>
  4. </van-row>
  5. <van-divider
  6. style="border-color: #d8d8d8; margin: 0"
  7. />
  8. <van-form
  9. ref="dataForm"
  10. input-align="left"
  11. error-message-align="left"
  12. @submit="onSubmit"
  13. style="background: #f6f6f6"
  14. >
  15. <van-cell-group :border="false">
  16. <van-field
  17. v-model="dataForm.amount"
  18. type="number"
  19. label="¥"
  20. clearable
  21. placeholder="请输入金额"
  22. class="input_field"
  23. />
  24. </van-cell-group>
  25. <div style="margin-top: 12px; padding: 8px 16px" class="save_btn">
  26. <van-button
  27. block
  28. type="primary"
  29. :disabled="!parseFloat(dataForm.amount)"
  30. native-type="submit"
  31. >
  32. 立即缴费
  33. </van-button>
  34. </div>
  35. </van-form>
  36. </template>
  37. <script>
  38. export default {
  39. props: {
  40. feeInfo: {
  41. type: Object,
  42. default: function () {
  43. return {};
  44. },
  45. },
  46. },
  47. data() {
  48. return {
  49. dataForm: {
  50. amount: "",
  51. },
  52. };
  53. },
  54. mounted() {
  55. this.$nextTick(() => {
  56. this.$refs.dataForm.resetValidation();
  57. });
  58. },
  59. methods: {
  60. onSubmit() {
  61. this.feeInfo.amount = this.dataForm.amount;
  62. this.$emit("close",this.feeInfo);
  63. },
  64. },
  65. };
  66. </script>
  67. <style lang="scss" scoped>
  68. .popup_title {
  69. padding: 12px 0;
  70. font-weight: 500;
  71. background-color: #ffffff;
  72. .van-col {
  73. font-size: 18px;
  74. }
  75. }
  76. .input_field {
  77. line-height: 68px;
  78. /deep/ {
  79. .van-field__label {
  80. width: unset;
  81. color: #0c1935;
  82. font-size: 24px;
  83. font-weight: 600;
  84. }
  85. .van-field__value {
  86. font-size: 20px;
  87. }
  88. }
  89. }
  90. </style>