<template>
  <el-dialog title="角色选择" :model-value="modelValue" :before-close="closed">
    内容
    <template #footer>
      <div class="dialog-footer">

        <el-button type="primary" @click="onConfirm"> <el-icon>
            <DocumentChecked />
          </el-icon>
          <span>保存</span></el-button>
        <el-button @click="closed"> <el-icon>
            <DocumentDelete />
          </el-icon>
          <span>关闭</span></el-button>
      </div>
    </template>
  </el-dialog>
</template>

<script setup>
import { defineProps } from 'vue';
defineProps({
  modelValue: {
    type: Boolean,
    required: true
  }
})
const emits = defineEmits(['update:modelValue'])

const closed = () => {
  emits('update:moselValus', false)
}
/**
 确定按钮点击事件
*/
const onConfirm = async () => {
  closed()
}
</script>

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