InfoWindow.vue
923 Bytes
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
<template>
<div>
<div class="box-card" style="padding: 0 80 30 80;width: 400px;border-radius: 10px;">
{{ title }}
<div id="del-div">
<div type="primary" icon="el-icon-close" @click="close()">123</div>
</div>
<div style="text-align: center;">
<button type="primary">主要按钮</button>
</div>
</div>
</div>
</template>
<script>
export default {
props: {
infoWindow: {
type: Object,
default: () => { }
},
title: {
type: String,
default: ''
}
},
methods: {
// 关闭
close() {
// 高德地图信息窗关闭的api
this.infoWindow.close()
},
edit() {
console.log('编辑按钮测试')
},
del() {
console.log('删除按钮测试')
}
}
}
</script>
<style lang="less" scoped>
#del-div {
position: absolute;
right: 20;
top: 20;
transform: scale(1.2);
}
</style>