From c2876ff983769da273c919c4660f38d29d987e3f Mon Sep 17 00:00:00 2001 From: zhuhao <979263092@qq.com> Date: Fri, 9 Aug 2024 17:20:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8C=E6=9C=9F=EF=BC=9A=E9=A2=84=E7=BA=A6?= =?UTF-8?q?=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/index.js | 2 +- src/renderer/src/plugins/shareStore.js | 6 +-- src/renderer/src/store/modules/tool.js | 2 +- src/renderer/src/utils/tool.js | 6 +-- .../src/views/classManage/classReserv.vue | 12 ++++- .../src/views/classManage/reserv-item.vue | 29 ++++++++--- .../src/views/prepare/container/reserv.vue | 2 + src/renderer/src/views/prepare/index.vue | 48 ++++++++++++------- src/renderer/src/views/tool/sphere.vue | 8 +++- 9 files changed, 81 insertions(+), 34 deletions(-) diff --git a/src/main/index.js b/src/main/index.js index 653c83c..441bf06 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -243,4 +243,4 @@ function handleAll() { } } }) -} \ No newline at end of file +} diff --git a/src/renderer/src/plugins/shareStore.js b/src/renderer/src/plugins/shareStore.js index 1a43c74..da709f0 100644 --- a/src/renderer/src/plugins/shareStore.js +++ b/src/renderer/src/plugins/shareStore.js @@ -20,7 +20,7 @@ export function shareStorePlugin({store}) { function stateSync(store) { const storeName = store.$id const jsonStr = JSON.stringify(store.$state) - // console.log('state-change', jsonStr, storeName) + console.log('state-change', jsonStr, storeName) // 通知主线程更新 ipcRenderer?.invoke('pinia-state-change', storeName, jsonStr) } @@ -37,7 +37,7 @@ function stateChange(store) { // 更新状态 store.$patch(stateJson) // 您可以通过将其 $state 属性设置为新对象来替换 Store 的整个状态 - // store.$state = stateJson + // store.$state = stateJson } }) -} \ No newline at end of file +} diff --git a/src/renderer/src/store/modules/tool.js b/src/renderer/src/store/modules/tool.js index c3fe9a7..9ec7d55 100644 --- a/src/renderer/src/store/modules/tool.js +++ b/src/renderer/src/store/modules/tool.js @@ -12,4 +12,4 @@ export const useToolState = defineStore('tool', { }), actions: { } -}) \ No newline at end of file +}) diff --git a/src/renderer/src/utils/tool.js b/src/renderer/src/utils/tool.js index 87ee641..c9c91f1 100644 --- a/src/renderer/src/utils/tool.js +++ b/src/renderer/src/utils/tool.js @@ -19,7 +19,7 @@ const isDev = isNode?process.env.NODE_ENV !== 'production':'' export const ipcMain = Remote?.ipcMain || {} /** * 获取静态资源,开发和生产环境 - * @param {*} url + * @param {*} url * @param {*} type 类型 app 应用内 user (用户目录 selfFile 自定义文件路径) * @returns */ @@ -67,9 +67,9 @@ export function ipcMsgInvoke(key, ...args) { /** * @description 封装ipcRenderer事件监听 * @param {*} fn on once handle invoke - * @param {*} key + * @param {*} key * @param {Function} cb 回调函数 - * @returns + * @returns */ export function ipcHandle(fn,key, cb) { return ipcRenderer[fn](key, cb) diff --git a/src/renderer/src/views/classManage/classReserv.vue b/src/renderer/src/views/classManage/classReserv.vue index 408b62e..8983269 100644 --- a/src/renderer/src/views/classManage/classReserv.vue +++ b/src/renderer/src/views/classManage/classReserv.vue @@ -24,10 +24,11 @@