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

fix: 修复样式设置时可能出现的样式影响其他组件问题 #13299
This commit is contained in:
王嘉豪
2024-11-28 13:21:20 +08:00
committed by GitHub

View File

@@ -1102,13 +1102,19 @@ const onFunctionCfgChange = val => {
}
const onBackgroundChange = val => {
curComponent.value.commonBackground = val
if (mobileInPc.value) {
//移动端设计
useEmitt().emitter.emit('onMobileStatusChange', {
type: 'componentStyleChange',
value: { type: 'commonBackground', component: JSON.parse(JSON.stringify(curComponent.value)) }
})
// 修复#13299
if (curComponent.value.id === view.value?.id) {
curComponent.value.commonBackground = val
if (mobileInPc.value) {
//移动端设计
useEmitt().emitter.emit('onMobileStatusChange', {
type: 'componentStyleChange',
value: {
type: 'commonBackground',
component: JSON.parse(JSON.stringify(curComponent.value))
}
})
}
}
}