fix(移动端): 修改移动端设计取消变动移动端设计没有被还原问题

This commit is contained in:
wangjiahao 2024-12-04 16:52:11 +08:00
parent fc5d025d2d
commit 3dc6ce9e4c
2 changed files with 5 additions and 5 deletions

View File

@ -1,7 +1,7 @@
<template> <template>
<div <div
class="bar-main" class="bar-main"
v-if="!mobileInPc" v-if="!mobileInPc && !isMobile()"
:class="[ :class="[
showEditPosition, showEditPosition,
{ {
@ -236,7 +236,7 @@ import { ElMessage, ElTooltip, ElButton } from 'element-plus-secondary'
import CustomTabsSort from '@/custom-component/de-tabs/CustomTabsSort.vue' import CustomTabsSort from '@/custom-component/de-tabs/CustomTabsSort.vue'
import { exportPivotExcel } from '@/views/chart/components/js/panel/common/common_table' import { exportPivotExcel } from '@/views/chart/components/js/panel/common/common_table'
import { XpackComponent } from '@/components/plugin' import { XpackComponent } from '@/components/plugin'
import { exportPermission } from '@/utils/utils' import { exportPermission, isMobile } from '@/utils/utils'
const dvMainStore = dvMainStoreWithOut() const dvMainStore = dvMainStoreWithOut()
const snapshotStore = snapshotStoreWithOut() const snapshotStore = snapshotStoreWithOut()
const copyStore = copyStoreWithOut() const copyStore = copyStoreWithOut()

View File

@ -410,9 +410,9 @@ export async function backCanvasData(dvId, mobileViewInfo, busiFlag, callBack) {
} }
} }
}) })
Object.keys(mobileViewInfo).forEach(key => { Object.keys(canvasViewInfoPreview).forEach(key => {
if (canvasViewInfo.value[key] && mobileViewInfo[key]) { if (canvasViewInfo.value[key] && canvasViewInfoPreview[key]) {
const { customAttrMobile, customStyleMobile } = mobileViewInfo[key] const { customAttrMobile, customStyleMobile } = canvasViewInfoPreview[key]
// 此处作为还原移动设计使用 // 此处作为还原移动设计使用
canvasViewInfo.value[key]['customStyleMobile'] = customStyleMobile canvasViewInfo.value[key]['customStyleMobile'] = customStyleMobile
canvasViewInfo.value[key]['customAttrMobile'] = customAttrMobile canvasViewInfo.value[key]['customAttrMobile'] = customAttrMobile