diff --git a/src/renderer/src/views/prepare/container/kj-list-item.vue b/src/renderer/src/views/prepare/container/kj-list-item.vue index 178486b..57bbc7d 100644 --- a/src/renderer/src/views/prepare/container/kj-list-item.vue +++ b/src/renderer/src/views/prepare/container/kj-list-item.vue @@ -106,6 +106,7 @@ import { listClasscourseNew } from '@/api/teaching/classcourse' import { endClass, getSelfReserv } from '@/api/classManage' import { listEntpcourse } from '@/api/teaching/classwork' import { createWindow } from '@/utils/tool' +import { defineExpose } from 'vue' const { ipcRenderer } = window.electron || {} export default { @@ -135,6 +136,7 @@ export default { default: '' } }, + expose: ['openFileWin'], emits: { 'on-start-class': null, 'on-delete': null, 'on-set': null, 'on-delhomework': null,'on-filearg': null }, data() { return { diff --git a/src/renderer/src/views/prepare/index.vue b/src/renderer/src/views/prepare/index.vue index 99a7826..54c1812 100644 --- a/src/renderer/src/views/prepare/index.vue +++ b/src/renderer/src/views/prepare/index.vue @@ -18,6 +18,7 @@ { this.curClassReserv = res.data this.openLesson(res.data.id); + this.$refs['kjItemRef'+this.activeClass.id][0].openFileWin(this.activeClass); }) }, getBookPathFromServer() {