2023西安数博会CIM演示-【前端】-Web
AdaKing88
2023-08-21 bc03b832caa49bbcd2674fe4cae3701b5059bf95
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
<template>
  <div id="rightMain">
    <!-- 左侧罗盘和指南针 START -->
    <div class="rightCompass">
 
    </div>
    <!-- 左侧罗盘和指南针 END -->
    <!-- 中间按钮 START -->
    <div class="switchBtn" @click="isShowDrawer = !isShowDrawer">
 
    </div>
    <!-- 中间按钮 END -->
 
    <!-- 右边内容 START -->
    <div class="content" :style="{ 'width': isShowDrawer ? '300px' : '0px' }">
    </div>
    <!-- 右边内容 END -->
 
 
  </div>
</template>
<script>
export default {
  data() {
    return {
      isShowDrawer: false, // 定义关闭按钮
    }
  },
  methods: {
 
  }
}
</script>
<style lang="less" scoped>
#rightMain {
  position: absolute;
  right: 0px;
  z-index: 999;
  height: 100%;
  display: flex;
  flex-direction: row;
 
  .rightCompass {
    width: 20px;
    height: 100%;
    border: solid 2px red;
  }
 
  .switchBtn {
    width: 20px;
    height: 100%;
    border: solid 2px yellow;
  }
 
  .content {
    font-size: 20px;
    color: aliceblue;
    width: 0px;
    height: 100%;
    border: solid 2px green;
    overflow: hidden;
    transition: 0.3s ease;
  }
}
</style>