mirror of
https://github.com/HangarMC/Hangar.git
synced 2025-03-07 15:31:00 +08:00
Improvements and fixes to logs page
This commit is contained in:
parent
03f7e3000c
commit
e3bc6ac556
@ -41,12 +41,24 @@ const props = withDefaults(
|
||||
}
|
||||
);
|
||||
|
||||
function getValue(val: Record<string, string>) {
|
||||
return typeof props.itemValue === "function" ? props.itemValue(val) : val[props.itemValue];
|
||||
function getValue(val: any) {
|
||||
if (typeof props.itemValue === "function") {
|
||||
return props.itemValue(val);
|
||||
} else if (val[props.itemValue]) {
|
||||
return val[props.itemValue];
|
||||
} else {
|
||||
return val as string;
|
||||
}
|
||||
}
|
||||
|
||||
function getText(val: Record<string, string>) {
|
||||
return typeof props.itemText === "function" ? props.itemText(val) : val[props.itemText];
|
||||
function getText(val: any) {
|
||||
if (typeof props.itemText === "function") {
|
||||
return props.itemText(val);
|
||||
} else if (val[props.itemText]) {
|
||||
return val[props.itemText];
|
||||
} else {
|
||||
return val as string;
|
||||
}
|
||||
}
|
||||
|
||||
watch(internalVal, (val) => emit("search", val));
|
||||
|
Loading…
Reference in New Issue
Block a user