This commit is contained in:
2026-09-24 16:25:22 +08:00
commit 7428184f01
1198 changed files with 314515 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
<template>
<text v-if="text != ''" :class="pcClass" :style="pcStyle">{{ text }}</text>
</template>
<script lang="uts" setup>
import { computed } from 'vue'
/**
* 优先级角标
* 0 → P0 紧急(红) / 1 → P1 优先(黄) / 2 → P2 常规(蓝)
*/
const props = defineProps({
level : { type: Number, default: 2 },
/** 自定义文字,空则取 P0/P1/P2 */
text : { type: String, default: '' },
/** 实底(默认)或浅底 */
outline : { type: Boolean, default: false }
})
const label = computed(() : string => {
if (props.text != '') { return props.text }
return `P${props.level}`
})
const pcClass = computed(() : string => {
return `hr-pc hr-pc${props.level}`
})
const pcStyle = computed(() : string => {
let c = '#DC2626'
if (props.level == 1) { c = '#F59E0B' }
if (props.level == 2) { c = '#2563EB' }
if (!props.outline) { return '' }
return `background-color:${c}1A;color:${c};`
})
</script>