From 9329da9ddfb4e73877a8eeb788be5e9134a7414c Mon Sep 17 00:00:00 2001 From: lyc Date: Tue, 24 Sep 2024 17:36:43 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=AB=A0=E8=8A=82=E5=88=87=E6=8D=A2=20edit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/store.js | 6 + .../src/components/choose-textbook/index.vue | 130 +++++------------- src/renderer/src/hooks/useGetSubject.js | 36 +++-- src/renderer/src/views/desktop/index.vue | 25 ++-- src/renderer/src/views/prepare/index.vue | 2 +- src/renderer/src/views/resource/index.vue | 2 +- 6 files changed, 71 insertions(+), 130 deletions(-) diff --git a/src/main/store.js b/src/main/store.js index c37f8f5..0607e19 100644 --- a/src/main/store.js +++ b/src/main/store.js @@ -16,6 +16,12 @@ const defaultData = { curSubjectNode: { data: {}, // 当前教材节点 (包含当前教材 单元) querySearch: {} // 查询资源所需参数 + }, + subject: { + bookList: null, // 教材列表 + curBook: null, // 当前选中的教材 + curNode: null, // 当前选中的节点 + defaultExpandedKeys: [], //展开的节点 } }, local: { // 本地(永久localStorage) diff --git a/src/renderer/src/components/choose-textbook/index.vue b/src/renderer/src/components/choose-textbook/index.vue index a79d68b..aa50586 100644 --- a/src/renderer/src/components/choose-textbook/index.vue +++ b/src/renderer/src/components/choose-textbook/index.vue @@ -44,11 +44,12 @@ diff --git a/src/renderer/src/views/prepare/index.vue b/src/renderer/src/views/prepare/index.vue index d675bcb..5de5618 100644 --- a/src/renderer/src/views/prepare/index.vue +++ b/src/renderer/src/views/prepare/index.vue @@ -1,6 +1,6 @@