From 979621b51587a9bc2d8115b78b1e53508a0e04c1 Mon Sep 17 00:00:00 2001 From: zhangxuelin <959231531@qq.com> Date: Thu, 12 Dec 2024 10:28:32 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E7=82=B9=E8=B5=9E=E5=92=8C=E7=96=91?= =?UTF-8?q?=E9=97=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/AixPPTist/src/store/screen.ts | 11 ++++++++++- .../src/AixPPTist/src/views/Screen/BaseView.vue | 15 ++++++++++++--- src/renderer/src/views/prepare/index.vue | 6 +----- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/src/renderer/src/AixPPTist/src/store/screen.ts b/src/renderer/src/AixPPTist/src/store/screen.ts index ec99745..e4fe1f5 100644 --- a/src/renderer/src/AixPPTist/src/store/screen.ts +++ b/src/renderer/src/AixPPTist/src/store/screen.ts @@ -1,17 +1,26 @@ import { defineStore } from 'pinia' export interface ScreenState { - screening: boolean + screening: boolean, + like: number, + doubt: number, } export const useScreenStore = defineStore('screen', { state: (): ScreenState => ({ screening: false, // 是否进入放映状态 + like:0, // 点赞数量 + doubt:0, // 疑问数量 }), actions: { setScreening(screening: boolean) { this.screening = screening }, + // 打开点赞或疑问 + openUpvote(type: 'like' | 'doubt'){ + if (type === 'like') this.like++ + else this.doubt++ + } }, }) \ No newline at end of file diff --git a/src/renderer/src/AixPPTist/src/views/Screen/BaseView.vue b/src/renderer/src/AixPPTist/src/views/Screen/BaseView.vue index ca6575f..7a564c9 100644 --- a/src/renderer/src/AixPPTist/src/views/Screen/BaseView.vue +++ b/src/renderer/src/AixPPTist/src/views/Screen/BaseView.vue @@ -58,9 +58,9 @@