fix(查询条件): 平铺展示多选首项应该禁用

This commit is contained in:
dataeaseShu
2026-01-16 09:48:40 +08:00
committed by dataeaseShu
parent 4378041c74
commit e8f498be75

View File

@@ -7,6 +7,10 @@ const props = defineProps({
type: Array,
default: () => []
},
disabled: {
type: Boolean,
default: false
},
activeItems: {
type: Array,
default: () => []
@@ -40,12 +44,13 @@ const btnColor = computed(() => {
const emits = defineEmits(['handleItemClick'])
const handleItemClick = (item: any) => {
if (props.disabled) return
emits('handleItemClick', item.value)
}
</script>
<template>
<div :style="customSelectStyle" class="flat-select">
<div :style="customSelectStyle" class="flat-select" :class="disabled && 'disabled-flat'">
<el-scrollbar>
<div class="scrollbar-flex-content">
<p
@@ -92,5 +97,14 @@ const handleItemClick = (item: any) => {
}
}
}
&.disabled-flat {
.select-item {
cursor: not-allowed;
&.active-select::after {
background-color: #eff0f1 !important;
}
}
}
}
</style>