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