wangrong
2026-08-30 761e5c5fa871959f60e15c971c8d83f2b53d0af5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<script setup lang="ts">
import { computed, toRefs } from 'vue'
import ComponentHang from '@/custom-component/independent-hang/ComponentHang.vue'
 
const props = defineProps({
  componentData: {
    type: Object,
    required: true
  },
  canvasViewInfo: {
    type: Object,
    required: true
  },
  themes: {
    type: String,
    required: true,
    default: 'dark'
  }
})
 
const { componentData, canvasViewInfo } = toRefs(props)
 
const hangComponentData = computed(() =>
  componentData.value.filter(ele => {
    return ele.component === 'VQuery' && ele.isHang === true
  })
)
</script>
 
<template>
  <el-popover
    width="300"
    trigger="click"
    :show-arrow="false"
    :popper-class="'custom-popover-' + themes"
  >
    <template #reference>
      <div class="reference-position">
        <el-button style="margin-right: 16px">隐藏按钮</el-button>
      </div>
    </template>
    <div>
      <component-hang
        :hang-component-data="hangComponentData"
        :canvas-view-info="canvasViewInfo"
        :scale="100"
      >
      </component-hang>
    </div>
  </el-popover>
</template>
<style lang="less" scoped>
.reference-position {
  position: absolute;
  right: 100px;
  top: 100px;
}
</style>