派生自 wuyushui/SewerAndRainNetwork

YANGDL
2021-01-05 77f7281ff7cee541aaa51339512e6443b7d89e42
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<template>
  <div class="floatPanel frontMap basemapLayer">
    <div v-for="item in basemapLayers" :key="item.id" class="basemapLayerItem">{{ item.text }}</div>
  </div>
</template>
 
<script>
export default {
  name: 'BaseMapController',
  mixins: [],
  components: [],
  data () {
    return {
      basemapLayers: [
        {
          id: 1,
          colorImgUrl: '',
          bwImgUrl: '',
          text: '1',
          layerId: ''
        },
        {
          id: 2,
          colorImgUrl: '',
          bwImgUrl: '',
          text: '2',
          layerId: ''
        },
        {
          id: 3,
          colorImgUrl: '',
          bwImgUrl: '',
          text: '3',
          layerId: ''
        }
      ]
    }
  },
  props: {
    /**
     * 图层控制展开方向
     */
    direction: {
      type: String,
      custom: true,
      default: () => 'top'
    },
    /**
     * 贴边的距离
     */
    padding: {
      type: [Number, String],
      custom: true,
      default: () => '5'
    },
    /**
     * 按钮尺寸
     */
    size: {
      type: [Number, Array],
      custom: true,
      default: () => [50, 50]
    },
    cls: {
      type: String,
      custom: true,
      default: () => this + 'basemap-controller'
    },
    /**
     * The bounds of the map, supports .sync modifier
     */
    layers: {
      type: Array,
      custom: true,
      default: null
    }
  }
}
</script>
 
<style scoped lang="less">
.frontMap {
  z-index: 1000;
}
 
.floatPanel {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 94px;
  height: 32px;
}
 
.basemapLayer {
  border: lightgray 1px solid;
}
 
.basemapLayerItem {
  width: 26px;
  height: 26px;
  margin: 2px;
 
  float: left;
  background-color: white;
}
</style>