Merge pull request #10380 from dataease/pr@dev-v2_st

fix(数据集): 数据集页面通过iframe方式嵌入后,编辑数据集,保存退出后页面一直在滚动
This commit is contained in:
dataeaseShu 2024-06-19 17:01:47 +08:00 committed by GitHub
commit dc299f2860
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 26 additions and 14 deletions

View File

@ -172,6 +172,10 @@ const deleteCascade = (idx, item) => {
setPlaceholder() setPlaceholder()
} }
const deleteCascadeBlock = idx => {
cascadeList.value.splice(idx, 1)
}
const addCascadeBlock = () => { const addCascadeBlock = () => {
const arr = [] const arr = []
addCascadeItem(arr) addCascadeItem(arr)
@ -214,12 +218,19 @@ defineExpose({
添加级联配置 添加级联配置
</el-button> </el-button>
<div class="cascade-content" v-for="(item, index) in cascadeList" :key="index"> <div class="cascade-content" v-for="(item, index) in cascadeList" :key="index">
<div style="display: flex; align-items: center; justify-content: space-between">
<el-button :disabled="item.length === 5" text @click="addCascadeItem(item)"> <el-button :disabled="item.length === 5" text @click="addCascadeItem(item)">
<template #icon> <template #icon>
<Icon name="icon_add_outlined"></Icon> <Icon name="icon_add_outlined"></Icon>
</template> </template>
添加级联条件 添加级联条件
</el-button> </el-button>
<el-button @click="deleteCascadeBlock(index)" class="cascade-delete-block" text>
<template #icon>
<Icon name="icon_delete-trash_outlined"></Icon>
</template>
</el-button>
</div>
<div class="cascade-item"> <div class="cascade-item">
<div class="label">查询条件层级</div> <div class="label">查询条件层级</div>
<div class="item-name">请选择查询条件</div> <div class="item-name">请选择查询条件</div>
@ -267,7 +278,7 @@ defineExpose({
/> />
</el-select> </el-select>
</div> </div>
<el-button @click="deleteCascade(idx, item)" class="cascade-delete" text> <el-button v-show="idx !== 0" @click="deleteCascade(idx, item)" class="cascade-delete" text>
<template #icon> <template #icon>
<Icon name="icon_delete-trash_outlined"></Icon> <Icon name="icon_delete-trash_outlined"></Icon>
</template> </template>
@ -345,7 +356,9 @@ defineExpose({
.item-field { .item-field {
width: 300px; width: 300px;
} }
}
.cascade-delete-block,
.cascade-delete { .cascade-delete {
width: 40px; width: 40px;
font-size: 20px; font-size: 20px;
@ -354,5 +367,4 @@ defineExpose({
} }
} }
} }
}
</style> </style>

View File

@ -683,7 +683,7 @@ const getMenuList = (val: boolean) => {
<div <div
class="dataset-content" class="dataset-content"
:class="{ :class="{
auto: isIframe || isDataEaseBi auto: isDataEaseBi
}" }"
> >
<template v-if="!state.datasetTree.length && mounted"> <template v-if="!state.datasetTree.length && mounted">