mirror of
https://github.com/ZeroCatDev/Classworks.git
synced 2025-12-07 21:13:11 +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:
parent
46dffb02ca
commit
3182699a78
@ -3,13 +3,19 @@
|
|||||||
"Component": true,
|
"Component": true,
|
||||||
"ComponentPublicInstance": true,
|
"ComponentPublicInstance": true,
|
||||||
"ComputedRef": true,
|
"ComputedRef": true,
|
||||||
|
"DirectiveBinding": true,
|
||||||
"EffectScope": true,
|
"EffectScope": true,
|
||||||
"ExtractDefaultPropTypes": true,
|
"ExtractDefaultPropTypes": true,
|
||||||
"ExtractPropTypes": true,
|
"ExtractPropTypes": true,
|
||||||
"ExtractPublicPropTypes": true,
|
"ExtractPublicPropTypes": true,
|
||||||
"InjectionKey": true,
|
"InjectionKey": true,
|
||||||
|
"MaybeRef": true,
|
||||||
|
"MaybeRefOrGetter": true,
|
||||||
"PropType": true,
|
"PropType": true,
|
||||||
"Ref": true,
|
"Ref": true,
|
||||||
|
"ShallowRef": true,
|
||||||
|
"Slot": true,
|
||||||
|
"Slots": true,
|
||||||
"VNode": true,
|
"VNode": true,
|
||||||
"WritableComputedRef": true,
|
"WritableComputedRef": true,
|
||||||
"computed": true,
|
"computed": true,
|
||||||
@ -20,12 +26,14 @@
|
|||||||
"effectScope": true,
|
"effectScope": true,
|
||||||
"getCurrentInstance": true,
|
"getCurrentInstance": true,
|
||||||
"getCurrentScope": true,
|
"getCurrentScope": true,
|
||||||
|
"getCurrentWatcher": true,
|
||||||
"h": true,
|
"h": true,
|
||||||
"inject": true,
|
"inject": true,
|
||||||
"isProxy": true,
|
"isProxy": true,
|
||||||
"isReactive": true,
|
"isReactive": true,
|
||||||
"isReadonly": true,
|
"isReadonly": true,
|
||||||
"isRef": true,
|
"isRef": true,
|
||||||
|
"isShallow": true,
|
||||||
"markRaw": true,
|
"markRaw": true,
|
||||||
"nextTick": true,
|
"nextTick": true,
|
||||||
"onActivated": true,
|
"onActivated": true,
|
||||||
@ -43,6 +51,7 @@
|
|||||||
"onServerPrefetch": true,
|
"onServerPrefetch": true,
|
||||||
"onUnmounted": true,
|
"onUnmounted": true,
|
||||||
"onUpdated": true,
|
"onUpdated": true,
|
||||||
|
"onWatcherCleanup": true,
|
||||||
"provide": true,
|
"provide": true,
|
||||||
"reactive": true,
|
"reactive": true,
|
||||||
"readonly": true,
|
"readonly": true,
|
||||||
@ -60,20 +69,16 @@
|
|||||||
"useAttrs": true,
|
"useAttrs": true,
|
||||||
"useCssModule": true,
|
"useCssModule": true,
|
||||||
"useCssVars": true,
|
"useCssVars": true,
|
||||||
|
"useId": true,
|
||||||
"useLink": true,
|
"useLink": true,
|
||||||
|
"useModel": true,
|
||||||
"useRoute": true,
|
"useRoute": true,
|
||||||
"useRouter": true,
|
"useRouter": true,
|
||||||
"useSlots": true,
|
"useSlots": true,
|
||||||
|
"useTemplateRef": true,
|
||||||
"watch": true,
|
"watch": true,
|
||||||
"watchEffect": true,
|
"watchEffect": true,
|
||||||
"watchPostEffect": true,
|
"watchPostEffect": true,
|
||||||
"watchSyncEffect": true,
|
"watchSyncEffect": true
|
||||||
"DirectiveBinding": true,
|
|
||||||
"MaybeRef": true,
|
|
||||||
"MaybeRefOrGetter": true,
|
|
||||||
"onWatcherCleanup": true,
|
|
||||||
"useId": true,
|
|
||||||
"useModel": true,
|
|
||||||
"useTemplateRef": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
57
package.json
57
package.json
@ -13,45 +13,46 @@
|
|||||||
"@examaware-cs/core": "^1.0.0",
|
"@examaware-cs/core": "^1.0.0",
|
||||||
"@examaware-cs/player": "^1.0.2",
|
"@examaware-cs/player": "^1.0.2",
|
||||||
"@mdi/font": "7.4.47",
|
"@mdi/font": "7.4.47",
|
||||||
"@microsoft/clarity": "^1.0.0",
|
"@microsoft/clarity": "^1.0.2",
|
||||||
"@vueuse/core": "^13.9.0",
|
"@vueuse/core": "^14.1.0",
|
||||||
"axios": "^1.11.0",
|
"axios": "^1.13.2",
|
||||||
"idb": "^8.0.3",
|
"idb": "^8.0.3",
|
||||||
"js-base64": "^3.7.8",
|
"js-base64": "^3.7.8",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.1",
|
||||||
"lucide-vue-next": "^0.545.0",
|
"lucide-vue-next": "^0.555.0",
|
||||||
"marked": "^16.4.0",
|
"marked": "^17.0.1",
|
||||||
"pinyin-pro": "^3.27.0",
|
"pinyin-pro": "^3.27.0",
|
||||||
"ratelimit-header-parser": "^0.1.0",
|
"ratelimit-header-parser": "^0.1.0",
|
||||||
"roboto-fontface": "*",
|
"roboto-fontface": "*",
|
||||||
"socket.io-client": "^4.8.1",
|
"socket.io-client": "^4.8.1",
|
||||||
"typewriter-effect": "^2.21.0",
|
"typewriter-effect": "^2.22.0",
|
||||||
"uuid": "^9.0.1",
|
"uuid": "^13.0.0",
|
||||||
"vue": "^3.5.20",
|
"vue": "^3.5.25",
|
||||||
"vue-sonner": "^2.0.9",
|
"vue-sonner": "^2.0.9",
|
||||||
"vuetify": "^3.9.6"
|
"vuetify": "^3.11.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/js": "^9.14.0",
|
"@eslint/js": "^9.39.1",
|
||||||
"@vite-pwa/assets-generator": "^1.0.0",
|
"@vite-pwa/assets-generator": "^1.0.2",
|
||||||
"@vitejs/plugin-vue": "^5.2.3",
|
"@vitejs/plugin-vue": "^6.0.2",
|
||||||
"eslint": "^9.14.0",
|
"eslint": "^9.39.1",
|
||||||
"eslint-plugin-import": "^2.29.1",
|
"eslint-plugin-import": "^2.32.0",
|
||||||
"eslint-plugin-n": "^16.6.2",
|
"eslint-plugin-n": "^17.23.1",
|
||||||
"eslint-plugin-node": "^11.1.0",
|
"eslint-plugin-node": "^11.1.0",
|
||||||
"eslint-plugin-promise": "^6.4.0",
|
"eslint-plugin-promise": "^7.2.1",
|
||||||
"eslint-plugin-vue": "^9.30.0",
|
"eslint-plugin-vue": "^10.6.2",
|
||||||
"pinia": "^3.0.3",
|
"pinia": "^3.0.4",
|
||||||
"sass": "1.86.3",
|
"sass": "1.94.2",
|
||||||
"sass-embedded": "^1.86.3",
|
"sass-embedded": "^1.93.3",
|
||||||
"unplugin-auto-import": "^19.1.2",
|
"unplugin-auto-import": "^20.3.0",
|
||||||
"unplugin-fonts": "^1.3.1",
|
"unplugin-fonts": "^1.4.0",
|
||||||
"unplugin-vue-components": "^28.4.1",
|
"unplugin-vue-components": "^30.0.0",
|
||||||
"unplugin-vue-router": "^0.12.0",
|
"unplugin-vue-router": "^0.18.0",
|
||||||
"vite": "^5.4.17",
|
"vite": "^7.2.4",
|
||||||
"vite-plugin-pwa": "^1.0.3",
|
"vite-plugin-pwa": "^1.2.0",
|
||||||
|
"vite-plugin-vue-devtools": "^8.0.5",
|
||||||
"vite-plugin-vue-layouts": "^0.11.0",
|
"vite-plugin-vue-layouts": "^0.11.0",
|
||||||
"vite-plugin-vuetify": "^2.1.2",
|
"vite-plugin-vuetify": "^2.1.2",
|
||||||
"vue-router": "^4.5.1"
|
"vue-router": "^4.6.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
3470
pnpm-lock.yaml
generated
3470
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -115,7 +115,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<v-btn icon="mdi-pencil" variant="text" size="small" @click="openEditDialog(item)"></v-btn>
|
<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>
|
</template>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
</v-list>
|
</v-list>
|
||||||
@ -311,7 +311,7 @@
|
|||||||
<v-card-actions>
|
<v-card-actions>
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
<v-btn color="grey-darken-1" variant="text" @click="deleteConfirmDialog = false">取消</v-btn>
|
<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-actions>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-dialog>
|
</v-dialog>
|
||||||
@ -672,7 +672,7 @@ export default {
|
|||||||
this.deleteConfirmDialog = true
|
this.deleteConfirmDialog = true
|
||||||
},
|
},
|
||||||
|
|
||||||
async confirmDelete() {
|
async executeDelete() {
|
||||||
if (!this.itemToDelete) return
|
if (!this.itemToDelete) return
|
||||||
|
|
||||||
const id = this.itemToDelete
|
const id = this.itemToDelete
|
||||||
@ -689,7 +689,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
confirmDelete(id) {
|
deletePersistentNotification(id) {
|
||||||
this.itemToDelete = id
|
this.itemToDelete = id
|
||||||
this.deleteConfirmDialog = true
|
this.deleteConfirmDialog = true
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
@import './glow.scss';
|
@use 'glow.scss';
|
||||||
|
|
||||||
// 添加卡片发光效果
|
// 添加卡片发光效果
|
||||||
.glow-track {
|
.glow-track {
|
||||||
|
|||||||
@ -12,12 +12,14 @@ import { VitePWA } from 'vite-plugin-pwa'
|
|||||||
// Utilities
|
// Utilities
|
||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from 'vite'
|
||||||
import { fileURLToPath, URL } from 'node:url'
|
import { fileURLToPath, URL } from 'node:url'
|
||||||
|
import vueDevTools from 'vite-plugin-vue-devtools'
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
base: './',
|
base: './',
|
||||||
plugins: [
|
plugins: [
|
||||||
VueRouter(),
|
VueRouter(),
|
||||||
|
vueDevTools(),
|
||||||
Layouts(),
|
Layouts(),
|
||||||
Vue({
|
Vue({
|
||||||
template: { transformAssetUrls }
|
template: { transformAssetUrls }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user