classMethod
This commit is contained in:
parent
974b64bb80
commit
fbcaff4b2b
1 changed files with 19 additions and 1 deletions
|
|
@ -179,6 +179,24 @@ function selectedDate() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function classColorMethod(val: string) {
|
||||||
|
switch (val) {
|
||||||
|
case "GET":
|
||||||
|
return "blue";
|
||||||
|
case "PUT":
|
||||||
|
return "warning";
|
||||||
|
case "POST":
|
||||||
|
return "primary";
|
||||||
|
case "PATCH":
|
||||||
|
return "teal-12";
|
||||||
|
case "DELETE":
|
||||||
|
return "red";
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
systemName.value = route.query.system as string;
|
systemName.value = route.query.system as string;
|
||||||
});
|
});
|
||||||
|
|
@ -299,7 +317,7 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name === 'method'">
|
<div v-else-if="col.name === 'method'">
|
||||||
<q-badge
|
<q-badge
|
||||||
text-color="blue"
|
:text-color="classColorMethod(col.value)"
|
||||||
style="background-color: #f0ecec"
|
style="background-color: #f0ecec"
|
||||||
>{{ col.value ?? "-" }}</q-badge
|
>{{ col.value ?? "-" }}</q-badge
|
||||||
>
|
>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue