修改查询类型

This commit is contained in:
zhx 2026-05-19 18:30:33 +08:00
parent ec97291d0e
commit 9d3880a8aa

View File

@ -85,6 +85,8 @@ const adminFreeOptions = [
];
const DEFAULT_STORE_CURRENCY_TYPES = 'GOLD';
const DEFAULT_STORE_VALID_DAYS = '7';
const DEFAULT_RESOURCE_CONFIG_TYPE =
(PROPS_RESOURCE_CONFIG_TYPES[0]?.value as string | undefined) ?? 'AVATAR_FRAME';
const query = reactive({
cursor: 1,
@ -97,9 +99,7 @@ const query = reactive({
limit: 20,
name: '',
sysOrigin: sysOriginOptions.value[0]?.value ?? 'LIKEI',
type: (PROPS_RESOURCE_CONFIG_TYPES[0]?.value ?? 'AVATAR_FRAME') as
| string
| undefined,
type: DEFAULT_RESOURCE_CONFIG_TYPE as string | undefined,
});
const columns = [
@ -203,7 +203,7 @@ function resetColumnFilter(key: unknown) {
break;
}
case 'typeName': {
query.type = undefined;
query.type = DEFAULT_RESOURCE_CONFIG_TYPE;
break;
}
}
@ -243,7 +243,7 @@ function resetAllColumnFilters() {
query.del = undefined;
query.id = '';
query.name = '';
query.type = undefined;
query.type = DEFAULT_RESOURCE_CONFIG_TYPE;
void loadData(true);
}
@ -598,7 +598,6 @@ loadData(true);
<template v-else-if="column.key === 'typeName'">
<Select
v-model:value="query.type"
allow-clear
option-label-prop="label"
placeholder="选择类型"
:options="PROPS_RESOURCE_CONFIG_TYPES.map((item) => ({ label: `${item.name}`, value: item.value as any }))"