aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorNtkskwk <natsukawa247@outlook.com>2024-09-03 15:55:35 +0800
committerNtkskwk <natsukawa247@outlook.com>2024-09-03 15:55:35 +0800
commitb336845dac0567bfce09dc0d4ffd6e27b1bc3d66 (patch)
tree5bc88ff4f3e6a3ac1f633ad1ab59616c10403d31
parente3ddb391b9a6b047af37eb1633e114edb598e91b (diff)
downloadHydroRoll-b336845dac0567bfce09dc0d4ffd6e27b1bc3d66.tar.gz
HydroRoll-b336845dac0567bfce09dc0d4ffd6e27b1bc3d66.zip
refactor: Optimize the cache of changelog
-rw-r--r--site/src/views/index/Right.vue10
1 files changed, 7 insertions, 3 deletions
diff --git a/site/src/views/index/Right.vue b/site/src/views/index/Right.vue
index ba8f294..f87d167 100644
--- a/site/src/views/index/Right.vue
+++ b/site/src/views/index/Right.vue
@@ -2,7 +2,7 @@
import Notepad from './Notepad/index.vue'
import DocumentationIcon from '@/components/icons/IconDocumentation.vue'
import { getChangeLog } from './Notepad/changelog'
-
+import { computed } from 'vue'
export default {
data() {
@@ -47,13 +47,17 @@ export default {
}
},
beforeCreate() {
- getChangeLog().then(res => {
+ changeLogMessage.value.then((res) => {
this.changeLogMessage = res;
this.change_page(this.mainPage);
- })
+ });
},
}
+const changeLogMessage = computed(() => {
+ return getChangeLog();
+})
+
</script>
<template>