# 弹窗

# 说明

确认提示弹窗,比如删除提示

# 使用


按钮组件
<template>
  <div class="t-input">
    <t-layout sectionTitle="按钮组件">
      <div class="content-main t-margin20">
        <el-button @click="submit">删除</el-button>
      </div>
    </t-layout>
  </div>
</template>

<script>
export default {
  data() {
    return {}
  },
  methods: {
    submit() {
      // 这里供业务组件处理一些事情,比如ajax请求 执行done()方法消失loading
      this.$OTAlert(
        { show: true, title: '提示', message: '确定删除该用户吗?', messageType: 'confrim' },
        () => {
          //  ajax  请求
          alert('ajax 请求')
        }
      )
    }
  }
}
</script>
显示代码

# 例子

this.$OTAlert({ title: '提示', message: '确定取消收藏该设备?', iconType: 'warning', messageType: 'confrim' }, () => {})

# 配置说明

参数 可选 默认 说明
Object - 提示信息
message - 消息内容
title 提示 标题
iconType warning 图标样式
messageType alert 消息类型
done - 成功事件回调
cancel - 取消事件回调