forked from github/dataease
fix: tabs组件中的视图全屏预览错误
This commit is contained in:
parent
2bd1c83e79
commit
0a63bf4e88
@ -35,7 +35,26 @@
|
||||
</span>
|
||||
|
||||
<div v-if="activeTabName === item.name" class="de-tab-content">
|
||||
<user-view v-if="item.content && item.content.propValue && item.content.propValue.viewId" :ref="item.name" :in-tab="true" :is-edit="isEdit" :active="active" :element="item.content" :filters="item.content.filters" :out-style="outStyle" />
|
||||
<!-- <user-view
|
||||
v-if="item.content && item.content.propValue && item.content.propValue.viewId"
|
||||
:ref="item.name"
|
||||
:in-tab="true"
|
||||
:is-edit="isEdit"
|
||||
:active="active"
|
||||
:element="item.content"
|
||||
:filters="item.content.filters"
|
||||
:out-style="outStyle"
|
||||
/> -->
|
||||
<user-view
|
||||
v-if="item.content && item.content.propValue && item.content.propValue.viewId"
|
||||
:ref="item.name"
|
||||
:in-tab="true"
|
||||
:is-edit="isEdit"
|
||||
:active="active"
|
||||
:element="item.content"
|
||||
:filters="filterMap[item.content.propValue && item.content.propValue.viewId]"
|
||||
:out-style="outStyle"
|
||||
/>
|
||||
</div>
|
||||
|
||||
</el-tab-pane>
|
||||
@ -96,7 +115,7 @@ import bus from '@/utils/bus'
|
||||
import componentList from '@/components/canvas/custom-component/component-list'
|
||||
import { mapState } from 'vuex'
|
||||
import { chartCopy } from '@/api/chart/chart'
|
||||
|
||||
import { buildFilterMap } from '@/utils/conditionUtil'
|
||||
export default {
|
||||
name: 'DeTabls',
|
||||
components: { ViewSelect },
|
||||
@ -142,7 +161,12 @@ export default {
|
||||
panelInfo() {
|
||||
return this.$store.state.panel.panelInfo
|
||||
},
|
||||
filterMap() {
|
||||
const map = buildFilterMap(this.componentData)
|
||||
return map
|
||||
},
|
||||
...mapState([
|
||||
'componentData',
|
||||
'curComponent',
|
||||
'mobileLayoutStatus'
|
||||
])
|
||||
|
@ -46,6 +46,11 @@ export const buildFilterMap = panelItems => {
|
||||
if (element.type === 'view') {
|
||||
result[element.propValue.viewId] = []
|
||||
}
|
||||
if (element.type === 'de-tabs') {
|
||||
element.options.tabList && element.options.tabList.forEach(tab => {
|
||||
result[tab.content.propValue.viewId] = []
|
||||
})
|
||||
}
|
||||
})
|
||||
panelItems.forEach(element => {
|
||||
if (element.type !== 'custom') {
|
||||
|
Loading…
Reference in New Issue
Block a user