liuyu
2 小时以前 82a74ba0402ab546ba524d23ce62198c4d00d2f7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
export const YES_NO_OPTIONS = [
  { id: '1', fullName: '是' },
  { id: '0', fullName: '否' },
];
 
export const ENABLE_OPTIONS = [
  { id: '1', fullName: '启用' },
  { id: '0', fullName: '停用' },
];
 
export function labelOfYesNo(v?: string) {
  return YES_NO_OPTIONS.find((x) => x.id === v)?.fullName || v || '-';
}
 
export function labelOfEnabled(v?: string) {
  return ENABLE_OPTIONS.find((x) => x.id === v)?.fullName || v || '-';
}