shikeying
2023-04-07 c192f834c4e092bc7c0f2722c343c25c1be619ab
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<template>
  <!--动画-->
  <transition name="el-fade-in">
    <el-dialog :destroy-on-close="true" :fullscreen="fullscreen" :width="width" :title="title" :visible.sync="visible" append-to-body @close="close">
      <div class="app-container">
        <slot />
        <div style="margin-top: 30px">
          <slot name="footer" />
        </div>
      </div>
    </el-dialog>
  </transition>
</template>
 
<script>
export default {
  props: {
    fullscreen: {
      type: Boolean,
      default: false
    },
    title: {
      type: String,
      default: ''
    },
    width: {
      type: String,
      default: '50%'
    }
  },
  data() {
    return {
      visible: true
    }
  },
  methods: {
    close() {
      this.visible = false
      this.$emit('close')
    }
  }
}
</script>
<style scoped lang="scss">
</style>