TALL renderjs vue3版本
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

23 lines
750 B

<template>
<view v-if="realDuration && planDuration">
<!-- 任务时长延迟插件 -->
<!-- 超时 -->
<span class="font-bold text-green-500" v-if="realDuration - 0 > planDuration - 0">
+{{ $time.formatDuration(realDuration - planDuration) }}
</span>
<!-- 延时 -->
<span class="font-bold text-red-500" v-if="realDuration - 0 < planDuration - 0">
-{{ $time.formatDuration(planDuration - realDuration) }}
</span>
</view>
</template>
<script setup>
import { computed, defineProps } from 'vue';
const props = defineProps({ task: { default: () => {}, type: Object } });
const realDuration = computed(() => props.task.realDuration);
const planDuration = computed(() => props.task.planDuration);
</script>