index3.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <template>
  2. <div>
  3. <el-dialog :title="dialogTitle?$t(dialogTitle):$t(`提示`)" :visible.sync="dialogTableVisible" append-to-body :show-close="false" width="600px">
  4. <slot name="formRule"></slot>
  5. <div slot="footer" class="dialog-footer">
  6. <el-button @click="onCancel" size="small">{{$t(`取 消`)}}</el-button>
  7. <el-button :disabled="type == '必填' && content.length == 0" :type="btnType?btnType:'primary'" @click="onSubmit" size="small">{{$t(`确 定`)}}</el-button>
  8. </div>
  9. </el-dialog>
  10. </div>
  11. </template>
  12. <script>
  13. export default {
  14. name: "index2",
  15. props:["btnTitle","disabled","btnType","content",'dialogTitle','type'],
  16. data(){
  17. return {
  18. dialogTableVisible:false,
  19. }
  20. },
  21. methods:{
  22. dialogShow(){
  23. this.dialogTableVisible = true
  24. this.$emit('dialogShow')
  25. },
  26. onCancel(){
  27. this.dialogTableVisible = false
  28. this.$emit('onCancel')
  29. },
  30. onSubmit(){
  31. this.$emit('onSubmit')
  32. }
  33. }
  34. }
  35. </script>
  36. <style scoped>
  37. /deep/ .el-dialog__body {
  38. padding: 0 20px 20px 20px !important;
  39. }
  40. </style>