<template>
  <el-dialog title="角色选择" :model-value="modelValue" @close="closed">
    内容
    <template #footer>
      <div class="dialog-footer">
        <el-button @click="closed">关闭</el-button>
        <el-button type="primary" @click="onConfirm">保存</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>
