Merge pull request #10555 from dataease/pr@dev-v2@style_filter

refactor: 优化过滤组件默认值配置样式
This commit is contained in:
王嘉豪 2024-06-27 11:56:14 +08:00 committed by GitHub
commit 7a4770d866
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,4 +1,3 @@
getLastStart
<script lang="ts" setup>
import { ElSelect } from 'element-plus-secondary'
import { computed, ref, toRefs } from 'vue'
@ -39,9 +38,15 @@ const props = defineProps({
curComponent: {
type: Object,
required: true
},
showPosition: {
type: String,
default: 'main'
}
})
const showFlag = computed(() => props.showPosition === 'main')
const { curComponent } = toRefs(props)
const relativeToCurrentTypeList = computed(() => {
@ -250,7 +255,7 @@ defineExpose({
</div>
</div>
</div>
<div v-if="!['1', '7', '8'].includes(curComponent.displayType)" class="list-item">
<div v-if="!['1', '7', '8'].includes(curComponent.displayType) && showFlag" class="list-item">
<div class="label">选项类型</div>
<div class="value">
<el-radio-group
@ -263,7 +268,7 @@ defineExpose({
</el-radio-group>
</div>
</div>
<div v-if="curComponent.displayType === '7'" class="list-item">
<div v-if="curComponent.displayType === '7' && showFlag" class="list-item">
<div class="label">
<el-checkbox v-model="curComponent.setTimeRange" label="设置时间筛选范围" />
</div>
@ -305,7 +310,7 @@ defineExpose({
</div>
<div
class="list-item"
v-if="+curComponent.displayType === 0 && curComponent.optionValueSource !== 1"
v-if="+curComponent.displayType === 0 && curComponent.optionValueSource !== 1 && showFlag"
>
<div class="label">
<el-tooltip