<!--
 * @desc 添加题库成功的提示
 * @author linyuanjie
 * @date 2023/10/16
-->

<template>
  <el-dialog
    :visible.sync="showDialog"
    width="400px"
    center
    :before-close="handleClose">
    <div class="tc">
      <i class="el-icon-success mb20 f40" style="color: #3963f3"></i>
      <p>{{ dialogType === 'add' ? '已添加到题库' : '已更新到题库' }}</p>
    </div>
    <span slot="footer" class="dialog-footer">
      <el-button @click="continueFn">继续录题</el-button>
      <el-button type="primary" @click="toAddQuestionnaire">创建试卷</el-button>
    </span>
  </el-dialog>
</template>

<script>
export default {
  name: "addQuestionSuccessTip",
  props:{
    showDialog:{
      type: Boolean,
      required: true,
      default:  false
    },
    dialogType: {
      type: String,
      default: 'add'
    }
  },
  methods: {
    handleClose () {
      this.$emit('update:showDialog', false)
    },
    continueFn () {
      this.handleClose()
      this.$emit('addFn')
    },
    toAddQuestionnaire () {

    }
  }
}
</script>

<style scoped>

</style>
