1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| <template> <a-tag :color="statusColor">{{ statusText }}</a-tag> </template>
<script> export default { computed: { statusColor() { const colorMap = { YiWanCheng: 'green', Aborted: '#9e9e9e', ShenPiZhong: 'orange', }; return colorMap[this.item.projectStatus]; }, statusText() { const textMap = { YiWanCheng: '已启动', Aborted: '已终止', ShenPiZhong: '审核中', }; return textMap[this.item.projectStatus]; }, }, }; </script>
|