forked from github/dataease
feat(数据大屏): 优化事件触发条件,增加支持组件
This commit is contained in:
parent
06d107f3bf
commit
476987dbe8
@ -207,21 +207,29 @@ const onPointClick = param => {
|
|||||||
emits('onPointClick', param)
|
emits('onPointClick', param)
|
||||||
}
|
}
|
||||||
|
|
||||||
const onWrapperClick = () => {
|
const eventEnable = computed(
|
||||||
if (['Picture,ScrollText'].includes(config.value.component)) {
|
() =>
|
||||||
// doWrapperClick
|
['Picture', 'CanvasIcon', 'CircleShape', 'SvgTriangle', 'RectShape', 'ScrollText'].includes(
|
||||||
if (config.value.events && config.value.events.checked) {
|
config.value.component
|
||||||
if (config.value.events.type === 'displayChange') {
|
) &&
|
||||||
|
config.value.events &&
|
||||||
|
config.value.events.checked
|
||||||
|
)
|
||||||
|
|
||||||
|
const onWrapperClick = e => {
|
||||||
|
if (eventEnable.value) {
|
||||||
|
if (config.value.events.type === 'showHidden') {
|
||||||
// 打开弹框区域
|
// 打开弹框区域
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
dvMainStore.popAreaActiveSwitch()
|
dvMainStore.popAreaActiveSwitch()
|
||||||
})
|
})
|
||||||
} else if (config.value.events.type === 'jump') {
|
} else if (config.value.events.type === 'jump') {
|
||||||
window.open(config.value.events.jump.value, '_blank')
|
window.open(config.value.events.jump.value, '_blank')
|
||||||
} else if (config.value.events.type === 'refresh') {
|
} else if (config.value.events.type === 'refreshDataV') {
|
||||||
useEmitt().emitter.emit('componentRefresh')
|
useEmitt().emitter.emit('componentRefresh')
|
||||||
}
|
}
|
||||||
}
|
e.preventDefault()
|
||||||
|
e.stopPropagation()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -264,8 +272,8 @@ const deepScale = computed(() => scale.value / 100)
|
|||||||
<div
|
<div
|
||||||
class="wrapper-inner-adaptor"
|
class="wrapper-inner-adaptor"
|
||||||
:style="slotStyle"
|
:style="slotStyle"
|
||||||
:class="{ 'pop-wrapper-inner': popActive }"
|
:class="{ 'pop-wrapper-inner': popActive, 'event-active': eventEnable }"
|
||||||
@click="onWrapperClick"
|
@mousedown="onWrapperClick"
|
||||||
>
|
>
|
||||||
<component
|
<component
|
||||||
:is="findComponent(config['component'])"
|
:is="findComponent(config['component'])"
|
||||||
@ -346,4 +354,7 @@ const deepScale = computed(() => scale.value / 100)
|
|||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
height: 100% !important;
|
height: 100% !important;
|
||||||
}
|
}
|
||||||
|
.event-active {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -95,7 +95,12 @@ const colorPickerWidth = computed(() => {
|
|||||||
|
|
||||||
// 暂时关闭
|
// 暂时关闭
|
||||||
const eventsShow = computed(() => {
|
const eventsShow = computed(() => {
|
||||||
return !dashboardActive.value && ['Picture'].includes(element.value.component)
|
return (
|
||||||
|
!dashboardActive.value &&
|
||||||
|
['Picture', 'CanvasIcon', 'CircleShape', 'SvgTriangle', 'RectShape', 'ScrollText'].includes(
|
||||||
|
element.value.component
|
||||||
|
)
|
||||||
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
const backgroundCustomShow = computed(() => {
|
const backgroundCustomShow = computed(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user