<template>
  <Modal :visible="visible" :width="720" :closeButton="true" @update:visible="val => emit('update:visible', val)">
    <div>
      <h3>AI 应用作业</h3>
      <pre>{{ work }}</pre>
    </div>
  </Modal>
</template>

<script lang="ts" setup>
import { computed } from 'vue'
import Modal from '@/components/Modal.vue'

const props = defineProps<{
  visible: boolean
  work: any
}>()

const emit = defineEmits<{
  (e: 'update:visible', v: boolean): void
}>()

const visible = computed({
  get: () => props.visible,
  set: (v: boolean) => emit('update:visible', v)
})
</script> 