fix(web-admin): prevent duplicate date sort carets on CRM column headers.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
wuzilongandCursor committed 2026-09-08 22:55:08 +08:00
1 parent 45a6fc5cc5
commit 4529166e16
2 files changed
+19 -9

No files matched your search

@@ -214,14 +214,21 @@
defineOptions({ name: 'ColumnHeaderFilter' })
const props = defineProps<{
prop: string
label: string
type: ColumnFilterType
isActive: boolean
modelValue?: ColumnFilterState | null
options?: Array<{ value: string; label: string; count: number }>
}>()
const props = withDefaults(
defineProps<{
prop: string
label: string
type: ColumnFilterType
isActive: boolean
modelValue?: ColumnFilterState | null
options?: Array<{ value: string; label: string; count: number }>
/** CRM 外壳 CrmColFilterHeader 已自绘双三角时传 false,避免重复 */
enableSort?: boolean
}>(),
{
enableSort: true
}
)
const emit = defineEmits<{
'update:modelValue': [value: ColumnFilterState | null]
@@ -233,7 +240,9 @@
isSortActive: (prop: string, order?: 'asc' | 'desc') => boolean
} | null>('crmColumnSort', null)
const showSort = computed(() => Boolean(sortApi && props.type === 'datetime'))
const showSort = computed(
() => Boolean(props.enableSort && sortApi && props.type === 'datetime')
)
const visible = ref(false)
const draftText = ref('')
@@ -32,6 +32,7 @@
:prop="prop"
:label="label"
:type="def.type"
:enable-sort="false"
:is-active="api.isFilterActive(prop)"
:model-value="api.filters[prop] || null"
:options="options"