forked from github/dataease
Merge pull request #11793 from dataease/pr@dev-v2@refactor_tab-refresh
Pr@dev v2@refactor tab refresh
This commit is contained in:
commit
a13f6e259b
@ -67,6 +67,11 @@ const props = defineProps({
|
|||||||
required: false,
|
required: false,
|
||||||
default: 1
|
default: 1
|
||||||
},
|
},
|
||||||
|
outerSearchCount: {
|
||||||
|
type: Number,
|
||||||
|
required: false,
|
||||||
|
default: 0
|
||||||
|
},
|
||||||
isSelector: {
|
isSelector: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
@ -82,7 +87,8 @@ const {
|
|||||||
showPosition,
|
showPosition,
|
||||||
previewActive,
|
previewActive,
|
||||||
downloadStatus,
|
downloadStatus,
|
||||||
outerScale
|
outerScale,
|
||||||
|
outerSearchCount
|
||||||
} = toRefs(props)
|
} = toRefs(props)
|
||||||
const domId = 'preview-' + canvasId.value
|
const domId = 'preview-' + canvasId.value
|
||||||
const scaleWidthPoint = ref(100)
|
const scaleWidthPoint = ref(100)
|
||||||
@ -99,6 +105,9 @@ const dashboardActive = computed(() => {
|
|||||||
return dvInfo.value.type === 'dashboard'
|
return dvInfo.value.type === 'dashboard'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const curSearchCount = computed(() => {
|
||||||
|
return outerSearchCount.value + searchCount.value
|
||||||
|
})
|
||||||
// 大屏是否保持宽高比例 非全屏 full 都需要保持宽高比例
|
// 大屏是否保持宽高比例 非全屏 full 都需要保持宽高比例
|
||||||
const dataVKeepRadio = computed(() => {
|
const dataVKeepRadio = computed(() => {
|
||||||
return canvasStyleData.value?.screenAdaptor !== 'full'
|
return canvasStyleData.value?.screenAdaptor !== 'full'
|
||||||
@ -133,9 +142,6 @@ const canvasStyle = computed(() => {
|
|||||||
? changeStyleWithScale(canvasStyleData.value?.width, scaleHeightPoint.value) + 'px'
|
? changeStyleWithScale(canvasStyleData.value?.width, scaleHeightPoint.value) + 'px'
|
||||||
: '100%'
|
: '100%'
|
||||||
}
|
}
|
||||||
if (!dashboardActive.value) {
|
|
||||||
style['overflow-y'] = 'hidden'
|
|
||||||
}
|
|
||||||
return style
|
return style
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -414,7 +420,7 @@ defineExpose({
|
|||||||
:config="item"
|
:config="item"
|
||||||
:style="getShapeItemShowStyle(item)"
|
:style="getShapeItemShowStyle(item)"
|
||||||
:show-position="showPosition"
|
:show-position="showPosition"
|
||||||
:search-count="searchCount"
|
:search-count="curSearchCount"
|
||||||
:scale="mobileInPc ? 100 : scaleMin"
|
:scale="mobileInPc ? 100 : scaleMin"
|
||||||
:is-selector="props.isSelector"
|
:is-selector="props.isSelector"
|
||||||
@userViewEnlargeOpen="userViewEnlargeOpen($event, item)"
|
@userViewEnlargeOpen="userViewEnlargeOpen($event, item)"
|
||||||
|
@ -74,6 +74,7 @@
|
|||||||
:preview-active="editableTabsValue === tabItem.name"
|
:preview-active="editableTabsValue === tabItem.name"
|
||||||
:show-position="showPosition"
|
:show-position="showPosition"
|
||||||
:outer-scale="scale"
|
:outer-scale="scale"
|
||||||
|
:outer-search-count="searchCount"
|
||||||
></de-preview>
|
></de-preview>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</template>
|
</template>
|
||||||
@ -164,10 +165,24 @@ const props = defineProps({
|
|||||||
type: Number,
|
type: Number,
|
||||||
required: false,
|
required: false,
|
||||||
default: 1
|
default: 1
|
||||||
|
},
|
||||||
|
// 仪表板刷新计时器
|
||||||
|
searchCount: {
|
||||||
|
type: Number,
|
||||||
|
required: false,
|
||||||
|
default: 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const { element, isEdit, showPosition, canvasStyleData, canvasViewInfo, dvInfo, scale } =
|
const {
|
||||||
toRefs(props)
|
element,
|
||||||
|
isEdit,
|
||||||
|
showPosition,
|
||||||
|
canvasStyleData,
|
||||||
|
canvasViewInfo,
|
||||||
|
dvInfo,
|
||||||
|
scale,
|
||||||
|
searchCount
|
||||||
|
} = toRefs(props)
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
activeTabName: '',
|
activeTabName: '',
|
||||||
|
Loading…
Reference in New Issue
Block a user