inleft
2022-08-18 916b6bf89465f057532ad8469e4e0002fc361716
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>
I 6                 <a-button v-if="!drawerStatus" @click="changeDrawerStatus">
7                     展开
8                     <a-icon type="down" />
9                 </a-button>
10                 <a-button v-if="drawerStatus" @click="changeDrawerStatus">
11                     合上
12                     <a-icon type="up" />
13                 </a-button>
14             </div>
15             <div v-if="drawerStatus">
16                 <a-button @click="()=>this.$router.back(-1)">
17                     后退
18                     <a-icon type="left" />
19                 </a-button>
b505f3 20
916b6b 21                 <a-button @click="showPreview">
I 22                     预览
23                     <a-icon type="youtube" />
24                 </a-button>
25                 <a-button @click="showScreen" v-if="!screen">
26                     拉伸
27                     <a-icon type="arrows-alt" />
28                 </a-button>
29                 <a-button @click="showScreen" v-if="screen">
30                     缩小
31                     <a-icon type="shrink" />
32                 </a-button>
33                 <a-button @click="showModal">
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>