教师端仓库迁移1020
This commit is contained in:
38
src/views/excel/independent.vue
Normal file
38
src/views/excel/independent.vue
Normal file
@@ -0,0 +1,38 @@
|
||||
<template>
|
||||
<div class="independent-window">
|
||||
<WpsXlsxForm ref="formRef" :isIndependent="true" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { listen } from '@tauri-apps/api/event'
|
||||
import { getCurrentWindow } from '@tauri-apps/api/window'
|
||||
import WpsXlsxForm from '@/views/paper/question/WpsXlsxForm.vue'
|
||||
|
||||
defineOptions({ name: 'ExcelIndependent' })
|
||||
|
||||
const formRef = ref()
|
||||
|
||||
onMounted(async () => {
|
||||
// 监听表单提交成功事件,关闭窗口
|
||||
await listen('excel-form-success', async () => {
|
||||
const appWindow = getCurrentWindow()
|
||||
await appWindow.close()
|
||||
})
|
||||
|
||||
// 监听表单取消事件,关闭窗口(不传递数据)
|
||||
await listen('excel-form-cancel', async () => {
|
||||
const appWindow = getCurrentWindow()
|
||||
await appWindow.close()
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.independent-window {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user