CarSeriesModal.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <template>
  2. <div class="vehicle_servies_modal" v-if="modalFlag" @mousewheel="mousewheel">
  3. <div class="modal_content">
  4. <div class="input">
  5. <p>车系名称</p>
  6. <input type="text" v-model="carType" />
  7. </div>
  8. <div class="btn">
  9. <button @click="submit" style="margin: 0">保存</button>
  10. <button @click="hideModal" style="margin: 0">取消</button>
  11. </div>
  12. </div>
  13. </div>
  14. </template>
  15. <script>
  16. export default {
  17. props: {
  18. modalFlag: {
  19. type: Boolean,
  20. default: false,
  21. },
  22. },
  23. data() {
  24. return {
  25. carType: "",
  26. };
  27. },
  28. methods: {
  29. submit: function () {
  30. this.$emit("submit", this.carType);
  31. },
  32. hideModal: function () {
  33. this.$emit("hide_modal");
  34. },
  35. mousewheel: function (e) {
  36. e.preventDefault();
  37. },
  38. },
  39. };
  40. </script>
  41. <style scoped lang="less">
  42. .vehicle_servies_modal {
  43. position: fixed;
  44. left: 0;
  45. top: 0;
  46. height: 100vh;
  47. width: 100vw;
  48. background-color: rgba(127, 127, 127, 0.7);
  49. display: flex;
  50. justify-content: center;
  51. align-items: center;
  52. .modal_content {
  53. width: 600px;
  54. height: 300px;
  55. background-color: #fff;
  56. transform: translateY(-50px);
  57. .input {
  58. width: 280px;
  59. margin: 0 auto;
  60. margin-top: 80px;
  61. display: flex;
  62. height: 28px;
  63. p {
  64. width: 80px;
  65. height: 28px;
  66. line-height: 28px;
  67. }
  68. input {
  69. width: 200px;
  70. border: 1px solid #555;
  71. }
  72. }
  73. .btn {
  74. padding-left: 80px;
  75. margin: 0 auto;
  76. width: 200px;
  77. margin-top: 30px;
  78. display: flex;
  79. justify-content: space-between;
  80. button {
  81. margin: 0!;
  82. }
  83. }
  84. }
  85. }
  86. </style>