fix: 修复多个外设无法认证的问题
refactor: 同时使用更加优雅的方式处理injection
This commit is contained in:
@@ -48,14 +48,15 @@
|
||||
import { computed } from "vue";
|
||||
import { CheckCircle, XCircle, AlertTriangle, Info, X } from "lucide-vue-next";
|
||||
import { useAlertStore } from ".";
|
||||
import { useRequiredInjection } from "@/utils/Common";
|
||||
|
||||
const alertStore = useAlertStore();
|
||||
const alertStore = useRequiredInjection(useAlertStore);
|
||||
|
||||
// Computed classes for different alert types
|
||||
const alertClasses = computed(() => {
|
||||
const baseClasses = "shadow-lg max-w-sm";
|
||||
|
||||
switch (alertStore?.alertState.value.type) {
|
||||
switch (alertStore.alertState.value.type) {
|
||||
case "success":
|
||||
return `${baseClasses} alert-success`;
|
||||
case "error":
|
||||
|
||||
Reference in New Issue
Block a user