fix(listings): 手机端筛选地区更名为IP地区并对齐发布选项
- 名称统一:将手机端筛选抽屉的「资产地区」更名为「IP地区」,与PC端保持统一 - 选项对齐:地区选项优先对齐发布配置 publishOptions.region_options(常用登录地区),避免脏数据混入 - 验证通过:prettier、eslint、typecheck 及 65 个单测全部通过
This commit is contained in:
@@ -212,10 +212,11 @@ export function useHomeFilters(
|
||||
const advancedFiltersOpen = ref(false)
|
||||
|
||||
const regionOptions = computed(() =>
|
||||
uniqueOptions([
|
||||
...publishOptions.value.region_options,
|
||||
...listings.value.flatMap(item => assetRegions(item)),
|
||||
])
|
||||
uniqueOptions(
|
||||
publishOptions.value.region_options.length > 0
|
||||
? publishOptions.value.region_options
|
||||
: listings.value.flatMap(item => assetRegions(item))
|
||||
)
|
||||
)
|
||||
|
||||
const loginMethodOptions = computed(() =>
|
||||
|
||||
@@ -175,10 +175,11 @@ const loginMethodFilterOptions = computed(() =>
|
||||
)
|
||||
|
||||
const regionFilterOptions = computed(() =>
|
||||
uniqueOptions([
|
||||
...publishOptions.value.region_options,
|
||||
...listings.value.flatMap(item => assetRegions(item)),
|
||||
])
|
||||
uniqueOptions(
|
||||
publishOptions.value.region_options.length > 0
|
||||
? publishOptions.value.region_options
|
||||
: listings.value.flatMap(item => assetRegions(item))
|
||||
)
|
||||
)
|
||||
|
||||
const filterSections = computed<FilterSection[]>(() => [
|
||||
@@ -207,7 +208,7 @@ const filterSections = computed<FilterSection[]>(() => [
|
||||
maxPlaceholder: '最高比例',
|
||||
},
|
||||
{ key: 'server', title: '区服', type: 'chips', options: serverFilterOptions.value },
|
||||
{ key: 'region', title: '资产地区', type: 'chips', options: regionFilterOptions.value },
|
||||
{ key: 'region', title: 'IP地区', type: 'chips', options: regionFilterOptions.value },
|
||||
{ key: 'login', title: '上号方式', type: 'chips', options: loginMethodFilterOptions.value },
|
||||
{
|
||||
key: 'insurance',
|
||||
|
||||
Reference in New Issue
Block a user