forked from github/dataease
Merge pull request #12923 from dataease/pr@dev-v2@refactor_mobile2
refactor(仪表板): 移动端样式设计优化
This commit is contained in:
commit
67fb1cf4c8
@ -311,7 +311,7 @@ export const dvMainStore = defineStore('dataVisualization', {
|
||||
if (this.mobileInPc) {
|
||||
useEmitt().emitter.emit('curComponentChange', {
|
||||
type: 'curComponentChange',
|
||||
value: JSON.parse(JSON.stringify(this.curComponent))
|
||||
value: this.curComponent ? JSON.parse(JSON.stringify(this.curComponent)) : null
|
||||
})
|
||||
}
|
||||
},
|
||||
|
@ -787,5 +787,7 @@ export function mobileViewStyleSwitch(component) {
|
||||
const viewInfo = canvasViewInfo.value[component.id]
|
||||
viewInfo.customStyle = component.customStyle
|
||||
viewInfo.customAttr = component.customAttr
|
||||
viewInfo.title = component.title
|
||||
viewInfo.name = component.name
|
||||
}
|
||||
}
|
||||
|
@ -1061,8 +1061,16 @@ const onChangeMiscStyleForm = val => {
|
||||
|
||||
const onTextChange = val => {
|
||||
view.value.customStyle.text = val
|
||||
useEmitt().emitter.emit('updateTitle-' + view.value.id)
|
||||
snapshotStore.recordSnapshotCache('renderChart', view.value.id)
|
||||
if (mobileInPc.value) {
|
||||
//移动端设计
|
||||
useEmitt().emitter.emit('onMobileStatusChange', {
|
||||
type: 'componentStyleChange',
|
||||
value: { type: 'updateTitle', component: JSON.parse(JSON.stringify(view.value)) }
|
||||
})
|
||||
} else {
|
||||
useEmitt().emitter.emit('updateTitle-' + view.value.id)
|
||||
snapshotStore.recordSnapshotCache('renderChart', view.value.id)
|
||||
}
|
||||
}
|
||||
|
||||
const onLegendChange = val => {
|
||||
|
@ -77,6 +77,9 @@ const hanedleMessage = event => {
|
||||
} else if (type === 'calcData') {
|
||||
mobileViewStyleSwitch(component)
|
||||
useEmitt().emitter.emit('calcData-' + component.id, component)
|
||||
} else if (type === 'updateTitle') {
|
||||
mobileViewStyleSwitch(component)
|
||||
useEmitt().emitter.emit('updateTitle-' + component.id)
|
||||
} else if (['style', 'commonBackground'].includes(type)) {
|
||||
const mobileComponent = findComponentById(component.id)
|
||||
mobileComponent[type] = component[type]
|
||||
|
Loading…
Reference in New Issue
Block a user