Skip to content

Commit

Permalink
Table sort icon perf , delete sort & name icon
Browse files Browse the repository at this point in the history
  • Loading branch information
akfdwjx committed Aug 26, 2024
1 parent a295727 commit a11f2a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions src/components/function/RowSortSetting.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ function addSortCond(columnName: string, orderDesc: boolean) {
class="iw-row-sort__item p-1 flex w-full justify-between cursor-move py-2"
>
<div>
<i :class="`${iconSvg.GRABBER} mr-0.5`" />
<i :class="`${props.columnsConf.find(col => col.name === column.columnName)?.icon} mr-0.5`" />
{{ props.columnsConf.find(col => col.name === column.columnName)?.title }}
</div>
Expand Down Expand Up @@ -150,7 +149,6 @@ function addSortCond(columnName: string, orderDesc: boolean) {
:data-column-name="column.name"
>
<div>
<i :class="`${column.icon} mr-0.5 ml-1`" />
{{ column.title }}
</div>
<div class="iw-join ml-1">
Expand Down
6 changes: 3 additions & 3 deletions src/components/layout/list/ListHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,10 @@ function handleSort(column: ColumnConfWithSort) {
:title="column.title"
@click="(event: MouseEvent) => showHeaderContextMenu(event, column.name)"
>
<i :class="`${column.icon} mr-1`" /> {{ column.title }}
{{ column.title }}
<div v-if="column.hasOwnProperty('orderDesc')" class="sort-box flex flex-col items-center justify-center ml-2" @click.stop="handleSort(column as ColumnConfWithSort)">
<i class="sort-icon octicon-triangle-down-24 rotate-180 mb-[-3px]" :class="`${column.orderDesc === false ? 'text-primary' : ''}`" />
<i class="sort-icon octicon-triangle-down-24 mt-[-12px]" :class="column.orderDesc ? 'text-primary' : ''" />
<i class="sort-icon octicon-triangle-down-24 text-[rgb(192,196,204)] rotate-180 hover:text-[var(--sys-primary)]" :class="`${column.orderDesc === false ? 'text-primary' : ''}`" />
<i class="sort-icon octicon-triangle-down-24 text-[rgb(192,196,204)] mt-[-12px] hover:text-[var(--sys-primary)]" :class="column.orderDesc ? 'text-primary' : ''" />
</div>
</div>
<!-- 操作列 -->
Expand Down

0 comments on commit a11f2a5

Please sign in to comment.