You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

editDialog.vue 2.5 kB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <template>
  2. <el-dialog :close-on-click-modal="!deleteLoading" v-dlg-drag :title="dialogTitle" :visible.sync="deleteDialog">
  3. <div class="message-box__content">
  4. <div class="message-box-title" >
  5. <slot name="title"></slot>
  6. </div>
  7. <div class="message-box-info">
  8. <slot name="info"></slot>
  9. </div>
  10. </div>
  11. <slot name="content"></slot>
  12. <div slot="footer" class="dialog-footer">
  13. <el-button size="small" @click="deleteDialog = false">{{"取消"}}</el-button>
  14. <el-button size="small" style="background-color: #21ba45;color: #fff;" @click="deleteCallback.call(vmContext,deleteParam)">{{"确定"}}</el-button>
  15. </div>
  16. </el-dialog>
  17. </template>
  18. <script type="text/javascript">
  19. export default {
  20. data() {
  21. return {
  22. deleteDialog: false,
  23. };
  24. },
  25. props: {
  26. vmContext: {
  27. type: Object,
  28. default() {
  29. return {};
  30. }
  31. },
  32. dialogTitle: {
  33. type: String,
  34. default: '',
  35. },
  36. deleteLoading: {
  37. type: Boolean,
  38. default: false,
  39. },
  40. deleteCallback: {
  41. type: Function,
  42. default() {
  43. return () => {};
  44. }
  45. },
  46. deleteParam: {
  47. type: String,
  48. default: ''
  49. },
  50. value: {
  51. type: Boolean,
  52. default: false,
  53. }
  54. },
  55. computed: {
  56. },
  57. watch: {
  58. deleteDialog() {
  59. this.$emit('input', this.deleteDialog);
  60. },
  61. value() {
  62. this.deleteDialog = this.value;
  63. },
  64. },
  65. created() {
  66. this.deleteDialog = this.value;
  67. }
  68. };
  69. </script>
  70. <style scoped>
  71. .el-message-box__content .icon{float:left;}
  72. .message-box__content{}
  73. .message-box__content .icon{float:left;margin-right:20px;}
  74. .message-box__content .message-box-title{font-size:16px;padding:2px 0;color:#333;}
  75. .message-box__content .message-box-p{font-size:16px;padding:20px 0;color:#333;}
  76. .message-box__content .message-box-info{color:#999;padding:2px 0;}
  77. /deep/ .el-dialog__body{
  78. padding: 1rem;
  79. }
  80. /deep/ .el-dialog__header {
  81. background: #f0f0f0;
  82. padding: 1rem;
  83. }
  84. /deep/ .el-dialog__title {
  85. font-family: PingFangSC-Regular;
  86. font-size: 1.28571429rem;
  87. color: rgba(0,0,0,.87);
  88. font-weight: 200;
  89. line-height: 25px;
  90. height: 25px;
  91. }
  92. /deep/ .el-dialog__footer {
  93. background: #eff3f9;
  94. padding: 1rem;
  95. }
  96. /deep/ .el-dialog{
  97. width: 30%;
  98. }
  99. /deep/ .el-form-item__label{
  100. padding: 0;
  101. }
  102. </style>