Files
yudao-dev/src/views/home/components/finishDiv.vue
2026-03-31 15:13:13 +08:00

45 lines
975 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<!-- 显示累计值并绑定颜色类 -->
<div class="accumulated-value" :class="injectData.status">
{{ injectData.total }} <!-- 显示累计数据 -->
</div>
</template>
<script>
export default {
name: 'finishDiv', // 补充组件名,便于识别
props: {
injectData: { // 接收父组件传递的当前行数据
type: Object,
default: () => ({})
}
},
data() {
return {
// list: this.injectData // 将接收的行数据赋值给list便于模板使用
}
},
methods: {
// 若无需输入功能可删除changeInput方法若需保留可按需调整
// changeInput() {
// console.log(this.list)
// this.$emit('emitData', this.list)
// }
}
}
</script>
<style scoped>
/* 累计值基础样式 */
/* 已完成:绿色 #4CAF50 */
.accumulated-value.done {
color: #4CAF50;
}
/* 未完成:橙色 #FF9800 */
.accumulated-value.pending {
color: #FF9800;
}
</style>