inleft
2022-08-14 a3ab3afe580daa80e9689f6e513e75a385f75bac
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> -->
af029b 11             
00e46d 12             <a-button @click="showMessage">
I 13                 <a-badge status="success">
14                     消息
15                 </a-badge>
16                 <a-icon type="message" />
17             </a-button>
9c695b 18             <a-button @click="showPreview">
I 19                 预览
20                 <a-icon type="youtube" />
21             </a-button>
b505f3 22             <a-button @click="showModal">
I 23                 日志
f9c38e 24                 <a-icon type="plus-circle" />
I 25             </a-button>
26             <a-button @click="showScreen">
27                 {{screenModel}}
74344a 28                 <transition name="fade">
I 29                     <a-icon :type="iconType" />
30                 </transition>
b505f3 31             </a-button>
af029b 32             <a-button @click="addLink" v-if="showHidenButton">
I 33                 加链
34                 <a-icon type="smile" />
35             </a-button>
b505f3 36
f9c38e 37             <!-- <a-button>
b505f3 38                 工具
I 39                 <a-icon type="tool" style="margin-left: 0px;" />
f9c38e 40             </a-button> -->
b505f3 41         </div>
I 42     </a-affix>
43 </template>
44
45 <script>
af029b 46     import myConstant from "../../config/myConstant.js"
I 47
b505f3 48     export default {
I 49         data() {
f9c38e 50             return {
74344a 51                 iconType: "arrows-alt",
f9c38e 52                 screen: false,
af029b 53                 screenModel: "拉伸",
I 54                 showHidenButton: false,
55             }
56         },
57         mounted() {
58             let tempVisitorData = localStorage.getItem(myConstant.visitorDataKey);
59             if (tempVisitorData != null && JSON.parse(tempVisitorData).nickName == myConstant.userName) {
60                 //this.$message.info("认证成功..")
61                 this.showHidenButton = true
f9c38e 62             }
b505f3 63         },
I 64         methods: {
af029b 65             addLink() {
0dd41b 66                 this.$emit('addLink')
af029b 67             },
00e46d 68             showMessage() {
I 69                 this.$emit('showMessage')
70             },
b505f3 71             showModal() {
I 72                 this.$emit('showModal')
f9c38e 73             },
9c695b 74             showPreview() {
I 75                 this.$emit('showPreview')
76             },
f9c38e 77             showScreen() {
I 78                 this.$emit('showScreen')
79                 if (this.screen) {
80                     this.screenModel = "拉伸";
74344a 81                     this.iconType = "arrows-alt";
I 82                 } else {
f9c38e 83                     this.screenModel = "缩小";
74344a 84                     this.iconType = "shrink"
f9c38e 85                 }
74344a 86                 this.screen = !this.screen;
b505f3 87             }
I 88         },
89     }
90 </script>
91
74344a 92 <style lang="less">
00e46d 93     .myButton {
I 94         button {
95             min-width: 90px;
96         }
97     }
b505f3 98 </style>