v 1.0.8
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
export enum DataInfoTypeEnum {
|
||||
|
||||
/**
|
||||
* Discord
|
||||
*/
|
||||
Discord = "Discord",
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Maps a numeric index to a MachineAuthorizationType key-value pair
|
||||
* @param index The numeric index to map
|
||||
* @returns An object with the enum key and its corresponding value
|
||||
*/
|
||||
export function GetDataInfoTypeOption(index: number): string {
|
||||
const keys = Object.keys(DataInfoTypeEnum);
|
||||
switch (index) {
|
||||
case 0:
|
||||
return DataInfoTypeEnum[keys[0] as keyof typeof DataInfoTypeEnum];
|
||||
default:
|
||||
return DataInfoTypeEnum[keys[0] as keyof typeof DataInfoTypeEnum];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取MachineAuthorizationType的选项
|
||||
* @returns
|
||||
*/
|
||||
export function GetDataInfoTypeOptions(): { label: string, value: number }[] {
|
||||
return [
|
||||
{
|
||||
label: "Discord",
|
||||
value: 0
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user