diff --git a/apps/src/views/props/resource-config.vue b/apps/src/views/props/resource-config.vue index 40694ea..369392e 100644 --- a/apps/src/views/props/resource-config.vue +++ b/apps/src/views/props/resource-config.vue @@ -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);