mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-05-13 17:35:37 +00:00
🎈 perf: 更新引入
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
<script setup lang="ts">
|
||||
import InputGroup from "primevue/inputgroup";
|
||||
import InputGroupAddon from "primevue/inputgroupaddon";
|
||||
import { ref, defineProps, computed } from "vue";
|
||||
import { i18n, useNetworkStore, NetworkingMethod } from "../main";
|
||||
|
||||
import { i18n } from "~/modules/i18n";
|
||||
import { NetworkingMethod } from "~/types/network";
|
||||
|
||||
const networking_methods = ref([
|
||||
{ value: NetworkingMethod.PublicServer, label: i18n.global.t('public_server') },
|
||||
@@ -145,8 +144,8 @@ const presetPublicServers = [
|
||||
|
||||
|
||||
<div class="flex pt-4 justify-content-center">
|
||||
<Button :label="$t('run_network')" icon="pi pi-arrow-right" iconPos="right" @click="$emit('runNetwork', curNetwork)"
|
||||
:disabled="configInvalid" />
|
||||
<Button :label="$t('run_network')" icon="pi pi-arrow-right" iconPos="right"
|
||||
@click="$emit('runNetwork', curNetwork)" :disabled="configInvalid" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
import { ref, computed, onMounted, onUnmounted } from 'vue'
|
||||
import { useNetworkStore } from '../main';
|
||||
|
||||
const networkStore = useNetworkStore();
|
||||
|
||||
const props = defineProps<{
|
||||
@@ -230,7 +226,7 @@ let prevRxSum = 0;
|
||||
let txRate = ref('0');
|
||||
let rxRate = ref('0');
|
||||
onMounted(() => {
|
||||
rateIntervalId = setInterval(() => {
|
||||
rateIntervalId = window.setInterval(() => {
|
||||
let curTxSum = txGlobalSum();
|
||||
txRate.value = humanFileSize((curTxSum - prevTxSum) / (rateInterval / 1000));
|
||||
prevTxSum = curTxSum;
|
||||
|
||||
Reference in New Issue
Block a user