Skip to content

Commit

Permalink
ListHeader & ContextMenu style perf
Browse files Browse the repository at this point in the history
  • Loading branch information
akfdwjx committed Aug 23, 2024
1 parent 87503bf commit 8746a50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
17 changes: 2 additions & 15 deletions src/components/function/ContextMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,13 @@ onUnmounted(() => {
<teleport to="body">
<div
v-if="visible"
class="context-menu bg-info"
class="text-white text-[14px] fixed px-1 pt-1 rounded bg-[var(--sys-primary)] z-[10]"
:style="{ left: `${x}px`, top: `${y}px` }"
>
<div
v-for="item in menuData"
:key="item.id"
class="cursor-pointer pb-1"
@click="selectMenu(item)"
>
{{ item.label }}
Expand All @@ -105,17 +106,3 @@ onUnmounted(() => {
</teleport>
</div>
</template>

<style scoped>
.context-menu {
position: fixed;
padding:4px 4px 0;
border-radius: 5px;
font-size: 14px;
color:#fff;
div{
padding-bottom: 4px;
cursor: pointer;
}
}
</style>
4 changes: 2 additions & 2 deletions src/components/layout/list/ListHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ function handleSort(column: ColumnConfWithSort) {
>
<i :class="`${column.icon} mr-1`" /> {{ 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-chevron-up-12" :class="`${column.orderDesc === false ? 'text-primary' : ''}`" />
<i class="sort-icon octicon-chevron-down-12 mt-[-12px]" :class="column.orderDesc ? 'text-primary' : ''" />
<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' : ''" />
</div>
</div>
<!-- 操作列 -->
Expand Down

0 comments on commit 8746a50

Please sign in to comment.