showToast.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <template>
  2. <div class="showToast">
  3. <el-dialog
  4. :title="title"
  5. :visible.sync="isShowToast"
  6. width="520px"
  7. :center="true"
  8. @close="close"
  9. >
  10. <div class="content">
  11. {{desc}}
  12. </div>
  13. <span slot="footer" class="dialog-footer">
  14. <el-button @click="close">{{cancleBtnDesc||"取 消"}}</el-button>
  15. <el-button type="primary" @click="submit">{{submitBtnDesc || "确 定"}}</el-button>
  16. </span>
  17. </el-dialog>
  18. </div>
  19. </template>
  20. <script>
  21. export default {
  22. props: [ "title", "desc", "cancleBtnDesc", "submitBtnDesc", "isShowToast" ],
  23. components: {},
  24. data() {
  25. return {
  26. name: "",
  27. phone: "",
  28. mobile: this.$deviceType.isMobile()
  29. };
  30. },
  31. computed: {},
  32. mounted() {
  33. },
  34. methods: {
  35. close() {
  36. this.$emit('close')
  37. },
  38. submit() {
  39. this.$emit('submit')
  40. }
  41. }
  42. };
  43. </script>
  44. <style lang="scss">
  45. @import "~@/assets/css/scssCommon.scss";
  46. .showToast {
  47. .title {
  48. font-size: 19px;
  49. font-weight: 500;
  50. color: rgba(34, 34, 34, 1);
  51. line-height: 26px;
  52. text-align: center;
  53. }
  54. .content {
  55. line-height: 21px;
  56. font-size: 15px;
  57. text-align: center;
  58. }
  59. }
  60. </style>