From 52edd3b5c2804da452d256573ddce10316f4b810 Mon Sep 17 00:00:00 2001 From: JustAnotherID Date: Thu, 14 Sep 2023 21:40:50 +0800 Subject: [PATCH] =?UTF-8?q?feat(test):=20=E6=B5=8B=E8=AF=95=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E5=A2=9E=E5=8A=A0=E7=89=8C=E5=A0=86/js/=E5=B8=AE?= =?UTF-8?q?=E5=8A=A9=E6=96=87=E6=A1=A3=E7=9A=84=E9=87=8D=E8=BD=BD=E6=8C=89?= =?UTF-8?q?=E9=92=AE=20(#33)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/PageTest.vue | 58 ++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/src/components/PageTest.vue b/src/components/PageTest.vue index 01e41f6b..bf7f46fc 100644 --- a/src/components/PageTest.vue +++ b/src/components/PageTest.vue @@ -19,8 +19,16 @@
- + 发送 + + + 重载牌堆 + 重载JS + 重载帮助文件 +
@@ -30,6 +38,8 @@ import { computed, nextTick, onBeforeMount, onBeforeUnmount, ref } from 'vue'; import { useStore } from '~/store'; import imgSeal from '~/assets/seal.png' import imgMe from '~/assets/me.jpg' +import { Plus } from '@element-plus/icons-vue' +import { ElMessage } from 'element-plus'; const store = useStore() let timerMsg: number @@ -150,6 +160,42 @@ const loadAll = () => { ret.reverse() return ret } + +const deckReloading = ref(false) +const reloadDeck = async () => { + deckReloading.value = true + const ret = await store.deckReload() + if (ret.testMode) { + ElMessage.success('展示模式无法重载牌堆') + } else { + ElMessage.success('已重载牌堆') + } + deckReloading.value = false +} + +const jsReloading = ref(false) +const reloadJs = async () => { + jsReloading.value = true + const ret = await store.jsReload() + if (ret && ret?.testMode) { + ElMessage.success('展示模式无法重载JS') + } else { + ElMessage.success('已重载JS') + } + jsReloading.value = false +} + +const helpdocReloading = ref(false) +const reloadHelpdoc = async () => { + helpdocReloading.value = true + const ret = await store.helpDocReload() + if (ret && ret?.result) { + ElMessage.success('已重载帮助文档') + } else { + ElMessage.success( ret.err || '无法重载帮助文档') + } + helpdocReloading.value = false +}