|
|
@@ -231,8 +231,10 @@ function isVersionConflict(e: any): boolean {
|
|
|
}
|
|
|
|
|
|
// ---- computed ----
|
|
|
-const statusTagType = computed(() => {
|
|
|
- const map: Record<string, string> = {
|
|
|
+type TagType = '' | 'success' | 'info' | 'warning' | 'primary' | 'danger';
|
|
|
+
|
|
|
+const statusTagType = computed<TagType>(() => {
|
|
|
+ const map: Record<string, TagType> = {
|
|
|
PREPARED: 'info',
|
|
|
AWAITING_CONFIRMATION: 'warning',
|
|
|
EXECUTING: 'warning',
|
|
|
@@ -245,8 +247,8 @@ const statusTagType = computed(() => {
|
|
|
return map[props.command?.status ?? ''] ?? 'info';
|
|
|
});
|
|
|
|
|
|
-const riskTagType = computed(() => {
|
|
|
- const map: Record<string, string> = { L0: '', L1: 'warning', L2: 'danger', L3: 'danger' };
|
|
|
+const riskTagType = computed<TagType>(() => {
|
|
|
+ const map: Record<string, TagType> = { L0: '', L1: 'warning', L2: 'danger', L3: 'danger' };
|
|
|
return map[props.command?.riskLevel ?? ''] ?? '';
|
|
|
});
|
|
|
|