mirror of
https://github.com/dataease/dataease.git
synced 2026-05-14 21:12:33 +08:00
fix(查询条件): 平铺展示多选首项应该禁用
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user