el-dialog

<template>
  <div>
    <el-dialog :visible.sync="dialogVisibleProp" :title.sync="msg2" width="600px">
      <!-- <span>这是一段信息</span> -->
      <slot></slot>
      <div slot="footer" class="dialog-footer">
        <el-button @click="hide">取 消</el-button>
        <el-button type="primary" @click="hide">确 定</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import "css/achievementAnalysis/unit/dialog.css";
export default {
  name: "",
  props: {
    msg1: {
      type: Boolean,
      default: false
    },
    msg2: {
      type: String,
      default: ""
    }
  },
  data() {
    return {
      dialogVisible: false,
      dialogTitle: ""
    };
  },

  components: {},

  computed: {},

  beforeMount() {},

  mounted() {},

  methods: {
    hide() {
      this.$emit("emitParent", false);
      if (this.msg2 == "出错") {
        this.$router.go(-1);
      }
    }
  },
  watch: {},
  computed: {
    dialogVisibleProp: {
      get() {
        return this.msg1;
      },
      set(v) {
        this.$emit("update:msg1", v);
      }
    }
  }
};
</script>
<style lang='' scoped>
.el-dialog {
  /* min-height:700px;  */
}
.dialog-footer {
  text-align: center;
}
</style>
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容