<template>
  <div v-if="!$baseEventBus.isMobile">
    <el-dialog
      :title="title != null ? title : $t2('提示', 'components.confirmDialog.title')"
      :visible.sync="showWrap"
      v-if="showWrap"
      :close-on-click-modal="false"
      width="501px"
      custom-class="dialog-style tips-dialog warning"
      :append-to-body="true"
      :show-close="false"
      v-el-drag-dialog
      :destroy-on-close="true"
      :modal="false"
    >
      <div class="cont" v-html="content"></div>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" plain class="button-sty" @click="reject()"
          ><i class="el-icon-close el-icon"></i
          >{{ $t2("取 消", "system.button.cancel2") }}</el-button
        >
        <el-button type="primary" @click="resolve()" class="button-sty"
          ><i class="el-icon-check el-icon"></i
          >{{ $t2("确 定", "system.button.confirm2") }}</el-button
        >
      </span>
    </el-dialog>
  </div>
  <div v-else-if="showWrap">
    <div class="pop-tipsBox" :style="'display: block;z-index:' + zIndex">
      <div>
        <i class="icon"></i>
        <div class="cont">
          <p class="name">
            {{ title != null ? title : $t2("提示", "components.confirmDialog.title") }}
          </p>
          <p class="txt" v-html="content"></p>
        </div>
        <div class="btns">
          <el-button type="primary" class="btn" plain @click="reject()">{{
            $t2("取 消", "system.button.cancel2")
          }}</el-button>
          <el-button type="primary" class="btn" @click="resolve()">{{
            $t2("确 定", "system.button.confirm2")
          }}</el-button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { mixins } from "./mixins";

export default {
  // name: 'errorMsg',
  mixins: [mixins],
};
</script>

<style></style>
