Descriptions-item.vue 710 B

1234567891011121314151617181920212223242526
  1. <template>
  2. <td class="el-descriptions__cell el-descriptions__label is-bordered-label" colspan="1">
  3. <div class="cell-item">
  4. <i class="iconfont">{{ '\ue7d1' }}</i>
  5. {{ name }}
  6. </div>
  7. </td>
  8. <td class="el-descriptions__cell el-descriptions__content is-bordered-content" colspan="0">
  9. <el-tag type="danger"
  10. >{{ salary }}{{ ['T_user_name', 'T_user_post', 'T_user_dept'].includes(field) ? '' : '¥' }}</el-tag
  11. >
  12. </td>
  13. </template>
  14. <script setup lang="ts">
  15. import { toRefs } from 'vue'
  16. interface PropsType {
  17. name: string
  18. salary: string
  19. field: string
  20. }
  21. const props = defineProps<PropsType>()
  22. const { name, salary, field } = toRefs(props)
  23. </script>
  24. <style scoped></style>