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