<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>
|