Merge pull request #13073 from dataease/pr@dev-v2@fix_events

fix: 修复指标卡移动端事件可能不生效问题
This commit is contained in:
王嘉豪 2024-11-01 19:00:08 +08:00 committed by GitHub
commit c998c3d288
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 24 additions and 6 deletions

View File

@ -423,15 +423,28 @@ export function initCanvasDataMobile(dvId, busiFlag, callBack) {
function ({ canvasDataResult, canvasStyleResult, dvInfo, canvasViewInfoPreview }) {
const componentData = canvasDataResult.filter(ele => !!ele.inMobile)
canvasDataResult.forEach(ele => {
const { mx, my, mSizeX, mSizeY, mStyle, mPropValue, mEvents, mCommonBackground } = ele
const {
mx,
my,
mSizeX,
mSizeY,
mStyle,
mPropValue,
mEvents,
mCommonBackground,
style,
propValue,
events,
commonBackground
} = ele
ele.x = mx
ele.y = my
ele.sizeX = mSizeX
ele.sizeY = mSizeY
ele.mStyle = mStyle || ele.Style
ele.mPropValue = mPropValue || ele.propValue
ele.mEvents = mEvents || ele.events
ele.mCommonBackground = mCommonBackground || ele.commonBackground
ele.style = mStyle || style
ele.propValue = mPropValue || propValue
ele.events = mEvents || events
ele.commonBackground = mCommonBackground || commonBackground
if (ele.component === 'DeTabs') {
ele.propValue.forEach(tabItem => {
tabItem.componentData.forEach(tabComponent => {
@ -439,6 +452,11 @@ export function initCanvasDataMobile(dvId, busiFlag, callBack) {
tabComponent.y = tabComponent.my
tabComponent.sizeX = tabComponent.mSizeX
tabComponent.sizeY = tabComponent.mSizeY
tabComponent.style = tabComponent.mStyle || tabComponent.style
tabComponent.propValue = tabComponent.mPropValue || tabComponent.propValue
tabComponent.events = tabComponent.mEvents || tabComponent.events
tabComponent.commonBackground =
tabComponent.mCommonBackground || tabComponent.commonBackground
})
})
}

View File

@ -445,7 +445,7 @@ watch(
@onLabelChange="onLabelChange"
/>
</collapse-switch-item>
// tooltip
<!-- tooltip 为鼠标悬停 移动端看不到效果 不再单独配置 -->
<collapse-switch-item
v-if="showProperties('tooltip-selector') && !mobileInPc"
v-model="chart.customAttr.tooltip.show"