<template>
  <div v-if="!$baseEventBus.isMobile">
    <el-dialog
      :title="title != null ? title : $t2('提示', 'components.baseAlert.title')"
      :visible.sync="showWrap"
      v-if="showWrap"
      :close-on-click-modal="false"
      width="501px"
      custom-class="dialog-style tips-dialog warning"
      v-el-drag-dialog
      @close="closeDialog"
    >
      <div class="cont" ref="cont">
        <p v-html="content"></p>
      </div>
      <span slot="footer" class="dialog-footer">
        <input
          type="text"
          ref="hbtn"
          style="position: absolute; left: -999px; top: -999px"
        />
        <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.baseAlert.title") }}
          </p>
          <p class="txt" v-html="content"></p>
        </div>
        <div class="btns">
          <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 {
  mixins: [mixins],
};
</script>

<style></style>
