inleft
2022-08-11 859ec7a60a9a1f30c898dbf1ae05c50dccfc40e5
commit | author | age
b505f3 1 <template>
I 2     <a-affix :offset-top="600">
3
00e46d 4         <div style="padding-left:5px;" class="myButton">
f9c38e 5             <!-- <a-button @click="showDrawer1">
b505f3 6                 抽屉1
f9c38e 7             </a-button> -->
b505f3 8             <!-- <a-button @click="showDrawer2">
I 9                 抽屉2
10             </a-button> -->
00e46d 11             <a-button @click="showMessage">
I 12                 <a-badge status="success">
13                     消息
14                 </a-badge>
15                 <a-icon type="message" />
16             </a-button>
9c695b 17             <a-button @click="showPreview">
I 18                 预览
19                 <a-icon type="youtube" />
20             </a-button>
b505f3 21             <a-button @click="showModal">
I 22                 日志
f9c38e 23                 <a-icon type="plus-circle" />
I 24             </a-button>
25             <a-button @click="showScreen">
26                 {{screenModel}}
74344a 27                 <transition name="fade">
I 28                     <a-icon :type="iconType" />
29                 </transition>
b505f3 30             </a-button>
00e46d 31
b505f3 32
f9c38e 33             <!-- <a-button>
b505f3 34                 工具
I 35                 <a-icon type="tool" style="margin-left: 0px;" />
f9c38e 36             </a-button> -->
b505f3 37         </div>
I 38     </a-affix>
39 </template>
40
41 <script>
42     export default {
43         data() {
f9c38e 44             return {
74344a 45                 iconType: "arrows-alt",
f9c38e 46                 screen: false,
I 47                 screenModel: "拉伸"
48             }
b505f3 49         },
I 50         methods: {
00e46d 51             showMessage() {
I 52                 this.$emit('showMessage')
53             },
b505f3 54             showModal() {
I 55                 this.$emit('showModal')
f9c38e 56             },
9c695b 57             showPreview() {
I 58                 this.$emit('showPreview')
59             },
f9c38e 60             showScreen() {
I 61                 this.$emit('showScreen')
62                 if (this.screen) {
63                     this.screenModel = "拉伸";
74344a 64                     this.iconType = "arrows-alt";
I 65                 } else {
f9c38e 66                     this.screenModel = "缩小";
74344a 67                     this.iconType = "shrink"
f9c38e 68                 }
74344a 69                 this.screen = !this.screen;
b505f3 70             }
I 71         },
72     }
73 </script>
74
74344a 75 <style lang="less">
00e46d 76     .myButton {
I 77         button {
78             min-width: 90px;
79         }
80     }
b505f3 81 </style>