mirror of
https://github.com/dataease/dataease.git
synced 2025-02-25 03:52:59 +08:00
refactor(仪表板): 移动端样式设计优化
This commit is contained in:
parent
06a58bedfd
commit
017eb8589f
@ -311,7 +311,7 @@ export const dvMainStore = defineStore('dataVisualization', {
|
|||||||
if (this.mobileInPc) {
|
if (this.mobileInPc) {
|
||||||
useEmitt().emitter.emit('curComponentChange', {
|
useEmitt().emitter.emit('curComponentChange', {
|
||||||
type: '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]
|
const viewInfo = canvasViewInfo.value[component.id]
|
||||||
viewInfo.customStyle = component.customStyle
|
viewInfo.customStyle = component.customStyle
|
||||||
viewInfo.customAttr = component.customAttr
|
viewInfo.customAttr = component.customAttr
|
||||||
|
viewInfo.title = component.title
|
||||||
|
viewInfo.name = component.name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1061,8 +1061,16 @@ const onChangeMiscStyleForm = val => {
|
|||||||
|
|
||||||
const onTextChange = val => {
|
const onTextChange = val => {
|
||||||
view.value.customStyle.text = val
|
view.value.customStyle.text = val
|
||||||
|
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)
|
useEmitt().emitter.emit('updateTitle-' + view.value.id)
|
||||||
snapshotStore.recordSnapshotCache('renderChart', view.value.id)
|
snapshotStore.recordSnapshotCache('renderChart', view.value.id)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const onLegendChange = val => {
|
const onLegendChange = val => {
|
||||||
|
@ -77,6 +77,9 @@ const hanedleMessage = event => {
|
|||||||
} else if (type === 'calcData') {
|
} else if (type === 'calcData') {
|
||||||
mobileViewStyleSwitch(component)
|
mobileViewStyleSwitch(component)
|
||||||
useEmitt().emitter.emit('calcData-' + component.id, 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)) {
|
} else if (['style', 'commonBackground'].includes(type)) {
|
||||||
const mobileComponent = findComponentById(component.id)
|
const mobileComponent = findComponentById(component.id)
|
||||||
mobileComponent[type] = component[type]
|
mobileComponent[type] = component[type]
|
||||||
|
Loading…
Reference in New Issue
Block a user