import { computed } from "vue"
export function computedPriorityStyle() {
  /**
   * 紧急度颜色回显
   */
  const priorityStyle = computed(() => {
    return function(priority){
      if(priority){
        if(priority.value === 'L4' || priority.value === 'L5'){
          return { color: '#49B856' };
        } else if (priority.value === 'L2' || priority.value === 'L3'){
          return { color: '#F3A73F' };
        } else if (priority.value === 'L1'){
          return { color: '#FF0000' };
        } else {
          return {}
        }
      }else{
        return {};
      }
    }
  })

  return {
    priorityStyle
  };
}