# confirm(齐思博)

确认弹窗。

# 基础用法

h-confirm 打开一个确认弹窗,默认展示标题,描述,确认取消按钮。支持扩展关闭叉号、弹窗宽度、按钮文字、事件。

打开confirm弹窗

需要设置show属性,它接收Boolean,当为true时显示 nconfirm。内容支持插槽。

<template>
  <div>
    <h-button @click="hconfirm1=true;">打开confirm弹窗</h-button>
    <h-confirm
      title="白哦提"
      desc="neirong"
      :show="hconfirm1"
      @hcancel="hconfirm1=false"
      @hconfirm="hconfirm1=false"
    ></h-confirm>
  </div>
</template>
<script>
export default {
  data() {
    return {
      hconfirm1: false
    }
  }
}
</script>
显示代码

# Attributes(支持elementUI-Dialog对话框所有配置)

参数 说明 类型 可选值 默认值
title 标题 string — —
desc 标题 string — —
show 是否显示 Dialog boolean — false
cancelText 取消按钮文字,如果是916则不展示该按钮 string — 取消
confirmText 确定按钮文字,如果是916则不展示该按钮 string — 确定
width 弹窗宽度 string — 430px
footerVisible 是否展示底部按钮区域 boolean — true
showClose 是否展示关闭按钮 boolean — false

# Slot

name 说明
— 内容区

# Events

方法名 说明 参数
hconfirm 底部确定按钮回调 -
hcancel 底部取消按钮回调 -
hclose 关闭的回调