Merge pull request #9178 from dataease/pr@dev-v2@style_drill-menu

style(仪表板): 调整下钻弹框样式
This commit is contained in:
王嘉豪 2024-04-18 10:45:04 +08:00 committed by GitHub
commit b0595d19b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 21 additions and 5 deletions

View File

@ -101,6 +101,16 @@
<groupId>com.h2database</groupId> <groupId>com.h2database</groupId>
<artifactId>h2</artifactId> <artifactId>h2</artifactId>
</dependency> </dependency>
<dependency>
<groupId>io.dataease</groupId>
<artifactId>xpack-permissions</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.dataease</groupId>
<artifactId>xpack-base</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -422,9 +422,9 @@ export async function decompressionPre(params, callBack) {
} }
export function trackBarStyleCheck(element, trackbarStyle, scale) { export function trackBarStyleCheck(element, trackbarStyle, scale) {
const { width, height } = element.value.style const { width, height } = element.style
const widthReal = width * scale const widthReal = width
const heightReal = height * scale const heightReal = height
if (trackbarStyle.left < 0) { if (trackbarStyle.left < 0) {
trackbarStyle.left = 0 trackbarStyle.left = 0
} else if (widthReal - trackbarStyle.left < 60) { } else if (widthReal - trackbarStyle.left < 60) {

View File

@ -15,6 +15,7 @@ import ChartError from '@/views/chart/components/views/components/ChartError.vue
import { BASE_VIEW_CONFIG } from '../../editor/util/chart' import { BASE_VIEW_CONFIG } from '../../editor/util/chart'
import { customAttrTrans, customStyleTrans, recursionTransObj } from '@/utils/canvasStyle' import { customAttrTrans, customStyleTrans, recursionTransObj } from '@/utils/canvasStyle'
import { deepCopy } from '@/utils/utils' import { deepCopy } from '@/utils/utils'
import { trackBarStyleCheck } from '@/utils/canvasUtils'
const dvMainStore = dvMainStoreWithOut() const dvMainStore = dvMainStoreWithOut()
const { nowPanelTrackInfo, nowPanelJumpInfo, mobileInPc } = storeToRefs(dvMainStore) const { nowPanelTrackInfo, nowPanelJumpInfo, mobileInPc } = storeToRefs(dvMainStore)
@ -202,8 +203,13 @@ const action = param => {
trackClick(trackMenu.value[0]) trackClick(trackMenu.value[0])
} else { } else {
// //
state.trackBarStyle.left = param.x - 50 + 'px' const barStyleTemp = {
state.trackBarStyle.top = param.y + 10 + 'px' left: param.x - 50,
top: param.y + 10
}
trackBarStyleCheck(props.element, barStyleTemp, props.scale)
state.trackBarStyle.left = barStyleTemp.left + 'px'
state.trackBarStyle.top = barStyleTemp.top + 'px'
viewTrack.value.trackButtonClick() viewTrack.value.trackButtonClick()
} }
} }