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