DeleteModal.vue 1.7 KB

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