refactor(数据大屏、仪表板): 删除组件分享事件逻辑

This commit is contained in:
wangjiahao 2024-09-06 15:45:25 +08:00
parent a770c02759
commit 43d663de75
3 changed files with 1 additions and 20 deletions

View File

@ -268,8 +268,6 @@ const onWrapperClick = e => {
useEmitt().emitter.emit('componentRefresh')
} else if (config.value.events.type === 'fullScreen') {
useEmitt().emitter.emit('canvasFullscreen')
} else if (config.value.events.type === 'share') {
useEmitt().emitter.emit('shareComponent')
} else if (config.value.events.type === 'download') {
useEmitt().emitter.emit('canvasDownload')
}

View File

@ -18,14 +18,12 @@ import CanvasFilterBtn from '@/custom-component/canvas-filter-btn/Component.vue'
import { useEmitt } from '@/hooks/web/useEmitt'
import DatasetParamsComponent from '@/components/visualization/DatasetParamsComponent.vue'
import DeFullscreen from '@/components/visualization/common/DeFullscreen.vue'
import ShareHandler from '@/views/share/share/ShareHandler.vue'
const dvMainStore = dvMainStoreWithOut()
const { pcMatrixCount, curComponent, mobileInPc, canvasState } = storeToRefs(dvMainStore)
const openHandler = ref(null)
const customDatasetParamsRef = ref(null)
const emits = defineEmits(['onResetLayout'])
const fullScreeRef = ref(null)
const shareComponent = ref(null)
const props = defineProps({
canvasStyleData: {
type: Object,
@ -201,15 +199,6 @@ useEmitt({
}
})
useEmitt({
name: 'shareComponent',
callback: function () {
if (isMainCanvas(canvasId.value)) {
shareComponent.value.execute()
}
}
})
const resetLayout = () => {
if (downloadStatus.value) {
return
@ -454,12 +443,6 @@ defineExpose({
<de-fullscreen ref="fullScreeRef"></de-fullscreen>
<dataset-params-component ref="customDatasetParamsRef"></dataset-params-component>
<XpackComponent ref="openHandler" jsname="L2NvbXBvbmVudC9lbWJlZGRlZC1pZnJhbWUvT3BlbkhhbmRsZXI=" />
<ShareHandler
ref="shareComponent"
:resource-id="dvInfo.id"
:resource-type="dvInfo.type"
:weight="dvInfo.weight"
/>
</template>
<style lang="less" scoped>

View File

@ -22,7 +22,7 @@ const isDashboard = dvMainStore.dvInfo.type === 'dashboard'
const curSupportEvents = computed(() => {
if (isDashboard) {
return ['jump', 'refreshDataV', 'fullScreen', 'share', 'download']
return ['jump', 'refreshDataV', 'fullScreen', 'download']
} else {
return ['jump', 'showHidden', 'refreshDataV', 'fullScreen', 'download']
}