fix:remove reloadTimer getter

This commit is contained in:
raymond.chen 2022-06-15 09:46:46 +08:00
parent 1a8b7b4526
commit a43ea5a5c6
2 changed files with 5 additions and 8 deletions

View File

@ -57,9 +57,6 @@ export const appStore = defineStore({
reloadTimer: null,
}),
getters: {
_reloadTimer(): any {
return this.reloadTimer;
},
duration(): Duration {
return {
start: getLocalTime(this.utc, this.durationRow.start),

View File

@ -69,7 +69,7 @@ limitations under the License. -->
</div>
</template>
<script lang="ts" setup>
import { ref, reactive } from "vue";
import { ref } from "vue";
import { useI18n } from "vue-i18n";
import { useAppStoreWithOut } from "@/store/modules/app";
import timeFormat from "@/utils/timeFormat";
@ -100,8 +100,8 @@ const handleAuto = () => {
handleReload();
appStore.setReloadTimer(setInterval(handleReload, autoTime.value * 1000));
} else {
if (appStore._reloadTimer) {
clearInterval(appStore._reloadTimer);
if (appStore.reloadTimer) {
clearInterval(appStore.reloadTimer);
}
}
};
@ -109,8 +109,8 @@ const changeAutoTime = () => {
if (autoTime.value < 1) {
return;
}
if (appStore._reloadTimer) {
clearInterval(appStore._reloadTimer);
if (appStore.reloadTimer) {
clearInterval(appStore.reloadTimer);
}
if (auto.value) {
handleReload();