Merge pull request #12317 from dataease/pr@dev-v2@refactor_style

refactor(数据大屏): 明细背景优化
This commit is contained in:
王嘉豪 2024-09-20 10:24:19 +08:00 committed by GitHub
commit f7ceb8bc38
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -195,7 +195,8 @@ const DETAIL_CHART_ATTR: DeepPartial<ChartObj> = {
}
const state = reactive({
scale: 0.5
scale: 0.5,
componentSourceType: null
})
const DETAIL_TABLE_ATTR: DeepPartial<ChartObj> = {
senior: {
@ -209,7 +210,11 @@ const DETAIL_TABLE_ATTR: DeepPartial<ChartObj> = {
const authShow = computed(() => editMode.value === 'edit' || dvInfo.value.weight > 3)
const customExport = computed(() => {
const style = canvasStyleData.value ? getCanvasStyle(canvasStyleData.value, 'canvas-main') : {}
const style =
canvasStyleData.value &&
(optType.value === 'enlarge' || state.componentSourceType?.includes('table'))
? getCanvasStyle(canvasStyleData.value, 'canvas-main')
: {}
if (downLoading.value) {
const bashStyle = pixel.value.split(' * ')
style['width'] = bashStyle[0] + 'px!important'
@ -263,6 +268,7 @@ const dialogInit = (canvasStyle, view, item, opt, params = { scale: 0.5 }) => {
sourceViewType.value = view.type
optType.value = opt
dialogShow.value = true
state.componentSourceType = view.type
viewInfo.value = deepCopy(view) as DeepPartial<ChartObj>
viewInfo.value.customStyle.text.show = false
config.value = deepCopy(item)