Skip to content

Commit 76c2dba

Browse files
committed
规范代码格式
1 parent 0af2c4c commit 76c2dba

File tree

87 files changed

+3356
-3200
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+3356
-3200
lines changed

src/App.vue

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,27 @@
33
<!-- 正常路由 -->
44
<router-view v-slot="{ Component, route }">
55
<transition
6-
name="md3"
76
mode="out-in"
7+
name="md3"
88
>
99
<component
1010
:is="Component"
1111
:key="route.path"
1212
/>
1313
</transition>
1414
</router-view>
15-
<global-message />
16-
<rate-limit-modal />
15+
<global-message/>
16+
<rate-limit-modal/>
1717
</v-app>
1818
</template>
1919

2020
<script setup>
21-
import { onMounted } from "vue";
22-
import { useTheme } from "vuetify";
23-
import { getSetting } from "@/utils/settings";
21+
import {onMounted} from "vue";
22+
import {useTheme} from "vuetify";
23+
import {getSetting} from "@/utils/settings";
2424
import RateLimitModal from "@/components/RateLimitModal.vue";
2525
import Clarity from "@microsoft/clarity";
26+
2627
const theme = useTheme();
2728
2829
onMounted(() => {
@@ -44,7 +45,7 @@ onMounted(() => {
4445
.md3-enter-active,
4546
.md3-leave-active {
4647
transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
47-
transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
48+
transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
4849
}
4950
5051
.md3-enter-from {

src/assets/logo.svg

Lines changed: 24 additions & 22 deletions
Loading

src/axios/axios.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import axios from "axios";
2-
import { getSetting } from "@/utils/settings";
3-
import { parseRateLimit } from "ratelimit-header-parser";
2+
import {getSetting} from "@/utils/settings";
3+
import {parseRateLimit} from "ratelimit-header-parser";
44
import RateLimitModal from "@/components/RateLimitModal.vue";
5-
import { Base64 } from "js-base64";
5+
import {Base64} from "js-base64";
66

77
// 基本配置
88
const axiosInstance = axios.create({

src/components/AppHeader.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<template>
2-
<v-app-bar :elevation="2">
3-
<template v-slot:prepend>
4-
<v-app-bar-nav-icon></v-app-bar-nav-icon>
5-
</template>
2+
<v-app-bar :elevation="2">
3+
<template v-slot:prepend>
4+
<v-app-bar-nav-icon></v-app-bar-nav-icon>
5+
</template>
66

7-
<v-app-bar-title>作业</v-app-bar-title>
8-
</v-app-bar>
7+
<v-app-bar-title>作业</v-app-bar-title>
8+
</v-app-bar>
99
</template>
1010

1111
<script>

src/components/CacheManager.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
<v-card-title class="d-flex align-center">
44
<span>缓存管理</span>
55
<v-spacer></v-spacer>
6-
<v-btn color="error" @click="clearAllCaches" :loading="loading">
6+
<v-btn :loading="loading" color="error" @click="clearAllCaches">
77
清除所有缓存
88
</v-btn>
9-
<v-btn icon class="ml-2" @click="refreshCaches">
9+
<v-btn class="ml-2" icon @click="refreshCaches">
1010
<v-icon>mdi-refresh</v-icon>
1111
</v-btn>
1212
</v-card-title>
1313

1414
<v-card-text>
15-
<v-alert v-if="!serviceWorkerActive" type="warning" class="mb-4">
15+
<v-alert v-if="!serviceWorkerActive" class="mb-4" type="warning">
1616
Service Worker 未激活,缓存管理功能不可用。
1717
</v-alert>
1818

@@ -30,7 +30,7 @@
3030
</v-expansion-panel-title>
3131
<v-expansion-panel-text>
3232
<div class="d-flex justify-end mb-2">
33-
<v-btn color="error" size="small" @click="clearCache(cache.name)" :loading="loading">
33+
<v-btn :loading="loading" color="error" size="small" @click="clearCache(cache.name)">
3434
清除此缓存
3535
</v-btn>
3636
</div>
@@ -43,7 +43,7 @@
4343
{{ url }}
4444
</v-list-item-subtitle>
4545
<template v-slot:append>
46-
<v-btn icon size="small" color="error" @click="clearUrl(cache.name, url)">
46+
<v-btn color="error" icon size="small" @click="clearUrl(cache.name, url)">
4747
<v-icon>mdi-delete</v-icon>
4848
</v-btn>
4949
</template>
@@ -53,7 +53,7 @@
5353
</v-expansion-panel>
5454
</v-expansion-panels>
5555

56-
<v-skeleton-loader v-else-if="loading" type="article" />
56+
<v-skeleton-loader v-else-if="loading" type="article"/>
5757

5858
<v-alert v-else type="info">
5959
没有找到缓存数据。
@@ -99,7 +99,7 @@ export default {
9999
100100
try {
101101
// 获取所有缓存名称
102-
const cacheNames = await this.sendMessageToSW({ type: 'CACHE_KEYS' });
102+
const cacheNames = await this.sendMessageToSW({type: 'CACHE_KEYS'});
103103
104104
// 获取每个缓存的内容
105105
for (const cacheName of cacheNames.cacheNames) {
@@ -167,7 +167,7 @@ export default {
167167
168168
this.loading = true;
169169
try {
170-
const result = await this.sendMessageToSW({ type: 'CLEAR_ALL_CACHES' });
170+
const result = await this.sendMessageToSW({type: 'CLEAR_ALL_CACHES'});
171171
172172
if (result.success) {
173173
this.showMessage('已清除所有缓存', 'success');

0 commit comments

Comments
 (0)