1
0
mirror of https://github.com/ZeroCatDev/Classworks.git synced 2025-12-07 13:03:59 +00:00

refactor: update delete functionality in UrgentTestDialog and improve styles

- Changed the delete button action from confirmDelete to deletePersistentNotification in UrgentTestDialog.vue.
- Renamed confirmDelete method to executeDelete for clarity and updated its usage.
- Updated SCSS import from @import to @use for glow styles in index.scss.
- Added vueDevTools plugin to vite.config.mjs for enhanced development experience.
This commit is contained in:
Sunwuyuan 2025-11-30 12:39:55 +08:00
parent 46dffb02ca
commit 3182699a78
No known key found for this signature in database
GPG Key ID: A6A54CF66F56BB64
6 changed files with 1956 additions and 1604 deletions

View File

@ -3,13 +3,19 @@
"Component": true,
"ComponentPublicInstance": true,
"ComputedRef": true,
"DirectiveBinding": true,
"EffectScope": true,
"ExtractDefaultPropTypes": true,
"ExtractPropTypes": true,
"ExtractPublicPropTypes": true,
"InjectionKey": true,
"MaybeRef": true,
"MaybeRefOrGetter": true,
"PropType": true,
"Ref": true,
"ShallowRef": true,
"Slot": true,
"Slots": true,
"VNode": true,
"WritableComputedRef": true,
"computed": true,
@ -20,12 +26,14 @@
"effectScope": true,
"getCurrentInstance": true,
"getCurrentScope": true,
"getCurrentWatcher": true,
"h": true,
"inject": true,
"isProxy": true,
"isReactive": true,
"isReadonly": true,
"isRef": true,
"isShallow": true,
"markRaw": true,
"nextTick": true,
"onActivated": true,
@ -43,6 +51,7 @@
"onServerPrefetch": true,
"onUnmounted": true,
"onUpdated": true,
"onWatcherCleanup": true,
"provide": true,
"reactive": true,
"readonly": true,
@ -60,20 +69,16 @@
"useAttrs": true,
"useCssModule": true,
"useCssVars": true,
"useId": true,
"useLink": true,
"useModel": true,
"useRoute": true,
"useRouter": true,
"useSlots": true,
"useTemplateRef": true,
"watch": true,
"watchEffect": true,
"watchPostEffect": true,
"watchSyncEffect": true,
"DirectiveBinding": true,
"MaybeRef": true,
"MaybeRefOrGetter": true,
"onWatcherCleanup": true,
"useId": true,
"useModel": true,
"useTemplateRef": true
"watchSyncEffect": true
}
}

View File

@ -13,45 +13,46 @@
"@examaware-cs/core": "^1.0.0",
"@examaware-cs/player": "^1.0.2",
"@mdi/font": "7.4.47",
"@microsoft/clarity": "^1.0.0",
"@vueuse/core": "^13.9.0",
"axios": "^1.11.0",
"@microsoft/clarity": "^1.0.2",
"@vueuse/core": "^14.1.0",
"axios": "^1.13.2",
"idb": "^8.0.3",
"js-base64": "^3.7.8",
"js-yaml": "^4.1.0",
"lucide-vue-next": "^0.545.0",
"marked": "^16.4.0",
"js-yaml": "^4.1.1",
"lucide-vue-next": "^0.555.0",
"marked": "^17.0.1",
"pinyin-pro": "^3.27.0",
"ratelimit-header-parser": "^0.1.0",
"roboto-fontface": "*",
"socket.io-client": "^4.8.1",
"typewriter-effect": "^2.21.0",
"uuid": "^9.0.1",
"vue": "^3.5.20",
"typewriter-effect": "^2.22.0",
"uuid": "^13.0.0",
"vue": "^3.5.25",
"vue-sonner": "^2.0.9",
"vuetify": "^3.9.6"
"vuetify": "^3.11.0"
},
"devDependencies": {
"@eslint/js": "^9.14.0",
"@vite-pwa/assets-generator": "^1.0.0",
"@vitejs/plugin-vue": "^5.2.3",
"eslint": "^9.14.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^16.6.2",
"@eslint/js": "^9.39.1",
"@vite-pwa/assets-generator": "^1.0.2",
"@vitejs/plugin-vue": "^6.0.2",
"eslint": "^9.39.1",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-n": "^17.23.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.4.0",
"eslint-plugin-vue": "^9.30.0",
"pinia": "^3.0.3",
"sass": "1.86.3",
"sass-embedded": "^1.86.3",
"unplugin-auto-import": "^19.1.2",
"unplugin-fonts": "^1.3.1",
"unplugin-vue-components": "^28.4.1",
"unplugin-vue-router": "^0.12.0",
"vite": "^5.4.17",
"vite-plugin-pwa": "^1.0.3",
"eslint-plugin-promise": "^7.2.1",
"eslint-plugin-vue": "^10.6.2",
"pinia": "^3.0.4",
"sass": "1.94.2",
"sass-embedded": "^1.93.3",
"unplugin-auto-import": "^20.3.0",
"unplugin-fonts": "^1.4.0",
"unplugin-vue-components": "^30.0.0",
"unplugin-vue-router": "^0.18.0",
"vite": "^7.2.4",
"vite-plugin-pwa": "^1.2.0",
"vite-plugin-vue-devtools": "^8.0.5",
"vite-plugin-vue-layouts": "^0.11.0",
"vite-plugin-vuetify": "^2.1.2",
"vue-router": "^4.5.1"
"vue-router": "^4.6.3"
}
}

3470
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -115,7 +115,7 @@
</template>
<template v-slot:append>
<v-btn icon="mdi-pencil" variant="text" size="small" @click="openEditDialog(item)"></v-btn>
<v-btn icon="mdi-delete" variant="text" color="error" size="small" @click="confirmDelete(item.id)"></v-btn>
<v-btn icon="mdi-delete" variant="text" color="error" size="small" @click="deletePersistentNotification(item.id)"></v-btn>
</template>
</v-list-item>
</v-list>
@ -311,7 +311,7 @@
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="grey-darken-1" variant="text" @click="deleteConfirmDialog = false">取消</v-btn>
<v-btn color="error" variant="text" @click="confirmDelete">删除</v-btn>
<v-btn color="error" variant="text" @click="executeDelete">删除</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
@ -672,7 +672,7 @@ export default {
this.deleteConfirmDialog = true
},
async confirmDelete() {
async executeDelete() {
if (!this.itemToDelete) return
const id = this.itemToDelete
@ -689,7 +689,7 @@ export default {
}
},
confirmDelete(id) {
deletePersistentNotification(id) {
this.itemToDelete = id
this.deleteConfirmDialog = true
}

View File

@ -1,4 +1,4 @@
@import './glow.scss';
@use 'glow.scss';
// 添加卡片发光效果
.glow-track {

View File

@ -12,12 +12,14 @@ import { VitePWA } from 'vite-plugin-pwa'
// Utilities
import { defineConfig } from 'vite'
import { fileURLToPath, URL } from 'node:url'
import vueDevTools from 'vite-plugin-vue-devtools'
// https://vitejs.dev/config/
export default defineConfig({
base: './',
plugins: [
VueRouter(),
vueDevTools(),
Layouts(),
Vue({
template: { transformAssetUrls }