mirror of
https://github.com/dataease/dataease.git
synced 2025-02-24 19:42:56 +08:00
fix(系统管理): 调整全局列表筛选UI样式
This commit is contained in:
parent
24a0fe5b56
commit
34ae707e26
@ -1,5 +1,5 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, watch } from 'vue'
|
import { nextTick, ref, watch } from 'vue'
|
||||||
import { Icon } from '@/components/icon-custom'
|
import { Icon } from '@/components/icon-custom'
|
||||||
import { ElButton, ElDivider, ElIcon } from 'element-plus-secondary'
|
import { ElButton, ElDivider, ElIcon } from 'element-plus-secondary'
|
||||||
import { propTypes } from '@/utils/propTypes'
|
import { propTypes } from '@/utils/propTypes'
|
||||||
@ -29,10 +29,16 @@ const clearFilter = (index?: number) => {
|
|||||||
emits('clearFilter', index)
|
emits('clearFilter', index)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const clearFilterAll = () => {
|
||||||
|
emits('clearFilter', 'empty')
|
||||||
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
props.filterTexts,
|
() => props.filterTexts,
|
||||||
() => {
|
() => {
|
||||||
showScroll.value = container.value && container.value.scrollWidth > container.value.offsetWidth
|
nextTick(() => {
|
||||||
|
showScroll.value = container.value?.scrollWidth > container.value?.offsetWidth
|
||||||
|
})
|
||||||
},
|
},
|
||||||
{ deep: true }
|
{ deep: true }
|
||||||
)
|
)
|
||||||
@ -53,11 +59,28 @@ watch(
|
|||||||
<Icon name="icon_close_outlined"></Icon>
|
<Icon name="icon_close_outlined"></Icon>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</p>
|
</p>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
class="clear-btn clear-btn-inner"
|
||||||
|
v-if="!showScroll"
|
||||||
|
@click="clearFilterAll"
|
||||||
|
>
|
||||||
|
<template #icon>
|
||||||
|
<Icon name="icon_delete-trash_outlined"></Icon>
|
||||||
|
</template>
|
||||||
|
清空条件</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<el-icon @click="scrollNext" class="arrow-right arrow-filter" v-if="showScroll">
|
<el-icon @click="scrollNext" class="arrow-right arrow-filter" v-if="showScroll">
|
||||||
<Icon name="icon_right_outlined"></Icon>
|
<Icon name="icon_right_outlined"></Icon>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<el-button type="text" class="clear-btn" @click="clearFilter()">
|
<el-button
|
||||||
|
type="text"
|
||||||
|
class="clear-btn"
|
||||||
|
style="height: 24px; line-height: 24px"
|
||||||
|
v-if="showScroll"
|
||||||
|
@click="clearFilterAll"
|
||||||
|
>
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<Icon name="icon_delete-trash_outlined"></Icon>
|
<Icon name="icon_delete-trash_outlined"></Icon>
|
||||||
</template>
|
</template>
|
||||||
@ -102,8 +125,9 @@ watch(
|
|||||||
|
|
||||||
i {
|
i {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 2px;
|
right: 6px;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
|
font-size: 12px;
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
@ -150,6 +174,10 @@ watch(
|
|||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
height: 24px;
|
height: 24px;
|
||||||
|
|
||||||
|
.clear-btn-inner {
|
||||||
|
margin-top: -16px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user