guonan
2025-04-14 9e860a560c5a4b81abe2042b8d8698e253730502
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
// 坡向分析
<template>
  <div class="aspect">
    <el-button @click="handleDraw">绘制区域</el-button>
    <el-button @click="handleClear">关闭坡度</el-button>
  </div>
</template>
<script setup>
import { reactive, defineEmits } from "vue";
// 定义 emit 方法
const emit = defineEmits(["draw", "clear"]);
const handleDraw = () => {
  console.log("绘制区域");
  emit("draw");
};
const handleClear = () => {
  console.log("关闭坡度");
  emit("clear");
};
</script>
<style lang="less" scoped>
.aspect {
  width: 215px;
  height: 50px;
  background: url("@/assets/img/tools/plotting_new.png") no-repeat;
  filter: opacity(83%);
  background-size: 100% 100%;
  padding: 10px;
  box-sizing: border-box;
}
</style>