forked from github/dataease
Merge pull request #9140 from dataease/pr@dev@fix_tab-filter
fix(仪表板): 修复过滤组件无法作用于Tab内的问题
This commit is contained in:
commit
7fcf7b2bee
@ -452,6 +452,7 @@ export default {
|
||||
return this.componentDataShow || []
|
||||
},
|
||||
...mapState([
|
||||
'sourceComponentData',
|
||||
'previewCanvasScale',
|
||||
'isClickComponent'
|
||||
]),
|
||||
@ -824,10 +825,16 @@ export default {
|
||||
formatPoint(value, pointScale) {
|
||||
return value * pointScale
|
||||
},
|
||||
findSourceComponent(id) {
|
||||
return this.sourceComponentData.filter(element => element.id === id)[0]
|
||||
},
|
||||
handleScaleChange() {
|
||||
if (this.componentData) {
|
||||
const componentData = deepCopy(this.componentData)
|
||||
componentData.forEach(component => {
|
||||
if (component.type === 'custom') {
|
||||
component.style = deepCopy(this.findSourceComponent(component.id).style)
|
||||
}
|
||||
Object.keys(component.style).forEach(key => {
|
||||
if (this.needToChangeHeight.includes(key)) {
|
||||
component.style[key] = this.format(component.style[key], this.scaleHeight)
|
||||
|
@ -309,8 +309,6 @@ export function imgUrlTrans(url) {
|
||||
export function getNowCanvasComponentData(canvasId, showPosition) {
|
||||
if (showPosition && (showPosition.includes('email-task') || showPosition.includes('multiplexing'))) {
|
||||
return store.state.previewComponentData.filter(item => item.canvasId === canvasId)
|
||||
} else if (showPosition === 'preview') {
|
||||
return deepCopy(store.state.sourceComponentData.filter(item => item.canvasId === canvasId))
|
||||
} else {
|
||||
return store.state.componentData.filter(item => item.canvasId === canvasId)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user