inleft
2022-08-25 a23166e4fac771238a90ae5ddc5b1e53a1c7afb8
commit | author | age
ad2b70 1 <template>
41b36f 2     <div>
00e46d 3         <MyModal ref="myModal" />
I 4         <MyPreviewModal ref="MyPreviewModal" />
0dd41b 5         <MyMessage ref="MyMessage" v-if="openMessage" />
I 6         <MyLink ref="MyLink" v-if="openLinkAdd" />
b505f3 7
41b36f 8         <div class="blog-drawer">
74344a 9             <a-drawer placement="left" :closable="false" :visible="visibleDrawer" :getContainer="'body'"
I 10                 :after-visible-change="afterVisibleChange" @close="onCloseDrawer" :zIndex="90" :width="300"
b505f3 11                 :bodyStyle="{padding:'0px'}"
I 12                 :wrapStyle="{padding:'0px',top:'60px !important','height':'calc(100% - 60px) !important'}">
74344a 13                 <boxLeft @click="closeDrawer()"></boxLeft>
41b36f 14                 <boxRight></boxRight>
I 15             </a-drawer>
16         </div>
b505f3 17
0dd41b 18         <div class="blog-main">
b505f3 19
41b36f 20             <a-row>
6bcd13 21                 <keep-alive>
I 22                     <a-col v-bind="colApiLeft">
23                         <boxLeft></boxLeft>
24                         <boxRight></boxRight>
25                     </a-col>
26                 </keep-alive>
f5539f 27
74344a 28                 <a-col v-bind="colApiMain">
ec97e0 29                     <a-col v-bind="colMini" :style="{'position':'absolute','right':'5px'}">
e4f086 30                         <a-affix :offset-top="500">
74344a 31                             <a-button @click="showDrawer" style="padding:0px 10px">
ec97e0 32                                 <a-icon type="left-circle" />
b505f3 33                             </a-button>
2795be 34                             <a-button @click="showMessage" style="margin-top:10px;padding:0px 10px">
I 35                                 <a-icon type="message" />
36                             </a-button>
b505f3 37                         </a-affix>
I 38                     </a-col>
6bcd13 39                     <keep-alive>
af029b 40                         <router-view></router-view>
6bcd13 41                     </keep-alive>
41b36f 42                 </a-col>
f5539f 43
74344a 44                 <a-col v-bind="colApiRight">
2795be 45                     <tool @showModal="showModal" @showPreview="showPreview" @showScreen="showScreen"
0dd41b 46                         @showMessage="showMessage" @addLink="addLink" />
41b36f 47                 </a-col>
I 48             </a-row>
49         </div>
50
ad2b70 51     </div>
L 52 </template>
53
54 <script>
41b36f 55     import boxLeft from "../group/boxLeft.vue"
I 56     import boxRight from "../group/boxRight.vue"
b505f3 57     import tool from "../group/tool.vue"
I 58     import MyModal from "../group/MyModal.vue"
9c695b 59     import MyPreviewModal from "../group/MyPreviewModal.vue"
00e46d 60     import MyMessage from "../group/MyMessage.vue"
0dd41b 61     import MyLink from "../group/MyLink.vue"
74344a 62
I 63     import screenConfig from "../../config/screenConfig.js"
41b36f 64
ad2b70 65     export default {
41b36f 66
ad2b70 67         components: {
L 68             boxLeft,
69             boxRight,
b505f3 70             tool,
I 71             MyModal,
9c695b 72             MyPreviewModal,
00e46d 73             MyMessage,
0dd41b 74             MyLink,
ad2b70 75         },
d629d9 76         methods: {
f9c38e 77             showScreen() {
74344a 78                 if (this.scale) {
f9c38e 79                     //缩小
74344a 80                     this.colApiLeft = screenConfig.colApiLeftScale;
I 81                     this.colApiMain = screenConfig.colApiMainScale;
f9c38e 82                 } else {
I 83                     //放大
74344a 84                     this.colApiLeft = screenConfig.colApiLeft;
I 85                     this.colApiMain = screenConfig.colApiMain;
f9c38e 86                 }
74344a 87                 this.scale = !this.scale;
f9c38e 88             },
0dd41b 89             addLink() {
I 90                 this.openLinkAdd = true
91                 this.$nextTick(function() {
92                     this.$refs.MyLink.showModal();
93                 })
94             },
f5539f 95             showModal() {
b505f3 96                 this.$refs.myModal.showModal();
9c695b 97             },
I 98             showPreview() {
99                 this.$refs.MyPreviewModal.showModal();
f5539f 100             },
00e46d 101             showMessage() {
0dd41b 102                 this.openMessage = true
I 103                 this.$nextTick(function() {
104                     this.$refs.MyMessage.showModal();
105                 })
00e46d 106             },
41b36f 107             afterVisibleChange(val) {},
74344a 108             showDrawer() {
I 109                 this.visibleDrawer = true;
d629d9 110             },
74344a 111             onCloseDrawer() {
I 112                 this.visibleDrawer = false;
d629d9 113             },
L 114         },
ad2b70 115         data() {
L 116             return {
74344a 117                 scale: true,
I 118                 visibleDrawer: false,
119                 colMini: screenConfig.colMini,
120                 colApiLeft: screenConfig.colApiLeft,
121                 colApiRight: screenConfig.colApiRight,
0dd41b 122                 colApiMain: screenConfig.colApiMain,
I 123                 openLinkAdd: false,
124                 openMessage: false,
ad2b70 125             }
0dd41b 126         },
I 127
ad2b70 128     }
L 129 </script>
130
131 <style lang="less">
80476f 132     
83fb37 133
56a4b8 134     .swichTag {
41b36f 135         min-height: 750px;
56a4b8 136         padding: 30px 30px 10px;
I 137         border-radius: 15px;
f9c38e 138         box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.24), 0 17px 50px 0 rgba(0, 0, 0, 0.19);
I 139         padding: 20px 30px 0px;
56a4b8 140     }
f5539f 141
L 142     .holdHeight {
aab811 143         min-height: 780px;
I 144     }
d629d9 145
L 146
ad2b70 147     .blog-main {
859ec7 148         min-height: 860px;
41b36f 149         margin-top: 80px;
2f9d3c 150         padding-left: 3%;
I 151         padding-right: 3%;
ad2b70 152     }
L 153
154     /*左右两边的盒子容器*/
155     .blog-cell {
156         opacity: 0.8;
aab811 157         padding: 0px 14px 10px;
63f511 158         -moz-user-select: none;
I 159         -webkit-user-select: none;
160         -ms-user-select: none;
161         -khtml-user-select: none;
162         user-select: none;
ad2b70 163     }
L 164
165     /*左边部分*/
166     .blog-left-side {
167         position: sticky;
168         // top: 80px;
41b36f 169         // padding-left: 2%;
ad2b70 170         /*padding-right: 2%;*/
L 171     }
172
173     /*中间部分*/
174     .blog-body {
175         padding-top: 10px;
176         /*padding-left: 3%;*/
177         /*padding-right: 3%;*/
178     }
179
180     /*右边部分*/
181     .blog-right-side {
182         position: sticky;
183         top: -19%;
184         padding-top: 10px;
185         /*padding-left: 2%;*/
186         /*padding-right: 2%;*/
187     }
188
189     div .blog-right-side-meta div {
190         padding-left: 6%;
191         padding-right: 6%;
192         margin-bottom: 3%;
193     }
194
195
06ee76 196     @card-box-shadow: 8px 8px 18px rgba(0, 0, 0, 0.1), -8px -8px 18px rgba(255, 255, 255, 1);
L 197
ad2b70 198     /*---------------------
L 199         |   核心盒子构成start   |
200         ------- ---------------*/
201     .blog-container {
202         border-radius: 15px;
06ee76 203         // background-color: #f5f8fa;
ad2b70 204         background-color: white;
L 205
206         line-height: 1.4;
207         white-space: nowrap;
208         /*规定段落中的文本不进行换行:*/
209         text-align: center;
210         padding-top: 20px;
211         padding-bottom: 20px;
83fb37 212         // max-height: 300px;
ad2b70 213         /*margin-top: 10px;*/
L 214         /*min-height: 200px;*/
215
216         // overflow-x: hidden;
217         // overflow-y: overlay;
218         // display: block;
219
220         padding-top: 10px;
221         padding-bottom: 20px;
83fb37 222         // overflow: hidden;
06ee76 223         // box-shadow: 1px 1px 1px 2px #00000059;
b505f3 224
06ee76 225         // -webkit-box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.24), 0 17px 50px 0 rgba(0, 0, 0, 0.19);
L 226         // box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.24), 0 17px 50px 0 rgba(0, 0, 0, 0.19);
227
228         box-shadow: @card-box-shadow;
229         -webkit-box-shadow: @card-box-shadow;
230         transition: all .4s;
231         -webkit-transition: all .6s;
232         -moz-transition: all .6s;
233         -o-transition: all .6s;
234         -ms-transition: all .6s;
83fb37 235         transition: height 2s;
I 236
06ee76 237     }
L 238
239     //div本体阴影
240     .blog-container:hover {
241         transition: all .25s;
242         -webkit-box-shadow: 0 0 0 rgba(0, 0, 0, 0.2), 0 0 0 rgba(255, 255, 255, 0.8), inset 9px 9px 15px rgba(0, 0, 0, 0.1), inset -9px -9px 15px rgba(255, 255, 255, 1);
243         box-shadow: 0 0 0 rgba(0, 0, 0, 0.2), 0 0 0 rgba(255, 255, 255, 0.8), inset 9px 9px 15px rgba(0, 0, 0, 0.1), inset -9px -9px 15px rgba(255, 255, 255, 1);
ad2b70 244     }
L 245
246     .show-line {
247         border-top: 1px solid #999;
248     }
249
250     .blog-scroll {
251         padding-top: 10px;
252         overflow-x: hidden;
83fb37 253         overflow-y: hidden;
I 254
255         transition: height 1s;
256
ad2b70 257     }
L 258
259     .blog-scroll:hover::-webkit-scrollbar {
260         display: block;
261     }
262
263     .blog-scroll:hover::-webkit-scrollbar {
264         display: block;
265     }
266
267     .blog-scroll::-webkit-scrollbar {
268         width: 5px;
269         display: none;
270     }
271
272     .blog-scroll::-webkit-scrollbar-thumb {
273         background-color: rgba(153, 154, 170, 0.3);
274         border-radius: 2px;
275     }
276
277     /*margin滚动条上偏移*/
278     .blog-scroll::-webkit-scrollbar-track {
279         margin-top: 5px;
280         margin-bottom: 5px;
281     }
282 </style>