checkDatasource.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <template>
  2. <el-dialog
  3. width="700px"
  4. title="提示"
  5. :visible.sync="checkDatasourceVisible"
  6. :append-to-body="true"
  7. :close-on-click-modal="false"
  8. :before-close="handleClose"
  9. class="bs-dialog-wrap bs-el-dialog"
  10. >
  11. <div class="text-style">
  12. <div
  13. v-for="(item,index) in reasonList"
  14. :key="index"
  15. class="item"
  16. >
  17. <span v-if="reasonList.length>1"> {{ index+1 }}、</span>{{ item }}
  18. </div>
  19. </div>
  20. <span
  21. slot="footer"
  22. class="dialog-footer"
  23. >
  24. <el-button
  25. type="primary"
  26. @click="handleClose"
  27. >
  28. 确定
  29. </el-button>
  30. </span>
  31. </el-dialog>
  32. </template>
  33. <script>
  34. export default {
  35. props: {
  36. reasonList: {
  37. type: Array,
  38. default: () => []
  39. }
  40. },
  41. data () {
  42. return {
  43. checkDatasourceVisible: false
  44. }
  45. },
  46. methods: {
  47. handleClose () {
  48. this.checkDatasourceVisible = false
  49. }
  50. }
  51. }
  52. </script>
  53. <style lang="scss" scoped>
  54. @import '../../assets/style/bsTheme.scss';
  55. ::v-deep .el-dialog__body{
  56. min-height: 0 !important;
  57. }
  58. .item{
  59. padding: 8px 0;
  60. }
  61. .text-style{
  62. padding-right: 80px;
  63. color: var(--bs-el-text);
  64. }
  65. </style>