add rank.

This commit is contained in:
2023-02-10 10:19:43 +08:00
parent 5f39ec4fd2
commit c80352b245
22 changed files with 1197 additions and 1170 deletions

View File

@@ -1,28 +1,28 @@
<script setup lang="ts">
import { Select, SemiSelect } from "@element-plus/icons-vue"
import { useThemeVars } from "naive-ui"
const theme = useThemeVars()
const props = defineProps<{
status: "not_test" | "passed" | "failed"
}>()
const showIcon = computed(() => props.status !== "not_test")
const color = computed(() => {
if (props.status === "passed") return theme.value.successColor
if (props.status === "failed") return theme.value.errorColor
})
const Icon = computed(() => {
if (props.status === "passed") return Select
if (props.status === "failed") return SemiSelect
})
</script>
<template>
<n-icon v-if="showIcon" :color="color">
<component :is="Icon"></component>
</n-icon>
</template>
<style scoped></style>
<script setup lang="ts">
import { Select, SemiSelect } from "@element-plus/icons-vue"
import { useThemeVars } from "naive-ui"
const theme = useThemeVars()
const props = defineProps<{
status: "not_test" | "passed" | "failed"
}>()
const showIcon = computed(() => props.status !== "not_test")
const color = computed(() => {
if (props.status === "passed") return theme.value.successColor
if (props.status === "failed") return theme.value.errorColor
})
const Icon = computed(() => {
if (props.status === "passed") return Select
if (props.status === "failed") return SemiSelect
})
</script>
<template>
<n-icon v-if="showIcon" :color="color">
<component :is="Icon"></component>
</n-icon>
</template>
<style scoped></style>