<template>
  <div>
    <el-dialog v-model="props.confirmShow" :title=props.title width="30%" :before-close="cancel">
      <span>确认执行此项操作？</span>
      <template #footer>
        <span class="dialog-footer">

          <el-button type="primary" @click="confirm">
            确认
          </el-button>
          <el-button type="primary" @click="cancel">取消</el-button>
        </span>
      </template>
    </el-dialog>
  </div>
</template>

<script setup>
// 引入
import { defaultProps, defineEmits } from 'vue'

// 数据

const props = defineProps({
  confirmShow: {
    type: Boolean,
    default: false
  },
  title: {
    type: String,
    default: ''
  }
})
const emits = defineEmits(['changeNvi'], ['changeYvi'])

// 方法
const cancel = () => {
  emits('changeNvi', false)
}
const confirm = () => {
  emits('changeYvi', false)

}
</script>

<style lang="scss" scoped></style>