1
wangjuncheng
2025-06-06 7217e02e098b94e421b5a85ec13e0cd2ed35fbeb
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
<template>
  <div class="custom-panel">
    <div class="panel-content">
      <el-button @click="openModelDialog">
        开启模型库
      </el-button>
    </div>
  </div>
</template>
 
 
<script setup>
import { ref } from 'vue';
import { ElSwitch } from 'element-plus';
function handleDamOn() {
  window.Viewer = earthCtrl.viewer;
  earthCtrl.factory.createModelLibrary()
}
 
// 监听 switch 变化
function openModelDialog(value) {
  if (value) {
    handleDamOn();
  }
}
 
</script>
 
<style scoped>
.custom-panel {
  padding: 20px;
  width: 290px;
  background: url("@/assets/img/tools/plotting_new.png") no-repeat;
  filter: opacity(83%);
  background-size: 100% 100%;
  box-sizing: border-box;
}
 
.panel-content {
  display: flex;
  flex-direction: column;
}
</style>