From c3aa826406d52957d6f98d0ecd4b77413d5ce908 Mon Sep 17 00:00:00 2001
From: inleft <inleft@qq.com>
Date: Mon, 29 Aug 2022 18:23:08 +0800
Subject: [PATCH] 统计模块异步加载

---
 src/components/swichLabel/main1-home.vue |   54 ++++++++++++++++++++++++------------------------------
 1 files changed, 24 insertions(+), 30 deletions(-)

diff --git a/src/components/swichLabel/main1-home.vue b/src/components/swichLabel/main1-home.vue
index 8fb8274..3459e65 100644
--- a/src/components/swichLabel/main1-home.vue
+++ b/src/components/swichLabel/main1-home.vue
@@ -2,7 +2,8 @@
 	<div>
 		<MyModal ref="myModal" />
 		<MyPreviewModal ref="MyPreviewModal" />
-		<MyMessage ref="MyMessage" />
+		<MyMessage ref="MyMessage" v-if="openMessage" />
+		<MyLink ref="MyLink" v-if="openLinkAdd" />
 
 		<div class="blog-drawer">
 			<a-drawer placement="left" :closable="false" :visible="visibleDrawer" :getContainer="'body'"
@@ -26,7 +27,7 @@
 
 				<a-col v-bind="colApiMain">
 					<a-col v-bind="colMini" :style="{'position':'absolute','right':'5px'}">
-						<a-affix :offset-top="550">
+						<a-affix :offset-top="500">
 							<a-button @click="showDrawer" style="padding:0px 10px">
 								<a-icon type="left-circle" />
 							</a-button>
@@ -36,15 +37,13 @@
 						</a-affix>
 					</a-col>
 					<keep-alive>
-						<transition name="fade">
-							<router-view></router-view>
-						</transition>
+						<router-view></router-view>
 					</keep-alive>
 				</a-col>
 
 				<a-col v-bind="colApiRight">
 					<tool @showModal="showModal" @showPreview="showPreview" @showScreen="showScreen"
-						@showMessage="showMessage" />
+						@showMessage="showMessage" @addLink="addLink" />
 				</a-col>
 			</a-row>
 		</div>
@@ -59,6 +58,7 @@
 	import MyModal from "../group/MyModal.vue"
 	import MyPreviewModal from "../group/MyPreviewModal.vue"
 	import MyMessage from "../group/MyMessage.vue"
+	import MyLink from "../group/MyLink.vue"
 
 	import screenConfig from "../../config/screenConfig.js"
 
@@ -71,6 +71,7 @@
 			MyModal,
 			MyPreviewModal,
 			MyMessage,
+			MyLink,
 		},
 		methods: {
 			showScreen() {
@@ -85,6 +86,12 @@
 				}
 				this.scale = !this.scale;
 			},
+			addLink() {
+				this.openLinkAdd = true
+				this.$nextTick(function() {
+					this.$refs.MyLink.showModal();
+				})
+			},
 			showModal() {
 				this.$refs.myModal.showModal();
 			},
@@ -92,7 +99,10 @@
 				this.$refs.MyPreviewModal.showModal();
 			},
 			showMessage() {
-				this.$refs.MyMessage.showModal();
+				this.openMessage = true
+				this.$nextTick(function() {
+					this.$refs.MyMessage.showModal();
+				})
 			},
 			afterVisibleChange(val) {},
 			showDrawer() {
@@ -109,32 +119,17 @@
 				colMini: screenConfig.colMini,
 				colApiLeft: screenConfig.colApiLeft,
 				colApiRight: screenConfig.colApiRight,
-				colApiMain: screenConfig.colApiMain
+				colApiMain: screenConfig.colApiMain,
+				openLinkAdd: false,
+				openMessage: false,
 			}
-		}
+		},
+
 	}
 </script>
 
 <style lang="less">
-	@font-face {
-		font-family: 'HYTangMeiRen';
-		// font-display: swap;
-		src: url("http://t.inleft.com/share/z%E5%AD%97%E4%BD%93%E5%BA%93/hytmr55%E6%B1%89%E4%BB%AA%E5%94%90%E7%BE%8E%E4%BA%BA%E5%AD%97%E4%BD%93.woff") format("truetype");
-	}
-
-	span,
-	p,
-	a,
-	body,
-	h1,
-	h2,
-	h3,
-	h4,
-	h5,
-	h6,
-	code {
-		font-family: HYTangMeiRen !important;
-	}
+	
 
 	.swichTag {
 		min-height: 750px;
@@ -150,6 +145,7 @@
 
 
 	.blog-main {
+		min-height: 860px;
 		margin-top: 80px;
 		padding-left: 3%;
 		padding-right: 3%;
@@ -255,8 +251,6 @@
 		padding-top: 10px;
 		overflow-x: hidden;
 		overflow-y: hidden;
-
-		transition: height 1s;
 
 	}
 

--
Gitblit v1.9.1