From 0dd41bd8cee430d3a948b89c664cb511c400993c Mon Sep 17 00:00:00 2001
From: inleft <inleft@qq.com>
Date: Fri, 12 Aug 2022 19:11:46 +0800
Subject: [PATCH] 新增链接添加按钮,优化Dplayer播放

---
 src/components/swichLabel/main1-home.vue |   27 +++++++++++++++++++++------
 1 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/src/components/swichLabel/main1-home.vue b/src/components/swichLabel/main1-home.vue
index 8666551..9277329 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'"
@@ -14,7 +15,7 @@
 			</a-drawer>
 		</div>
 
-		<div class="blog-main ">
+		<div class="blog-main">
 
 			<a-row>
 				<keep-alive>
@@ -42,7 +43,7 @@
 
 				<a-col v-bind="colApiRight">
 					<tool @showModal="showModal" @showPreview="showPreview" @showScreen="showScreen"
-						@showMessage="showMessage" />
+						@showMessage="showMessage" @addLink="addLink" />
 				</a-col>
 			</a-row>
 		</div>
@@ -57,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"
 
@@ -69,6 +71,7 @@
 			MyModal,
 			MyPreviewModal,
 			MyMessage,
+			MyLink,
 		},
 		methods: {
 			showScreen() {
@@ -83,6 +86,12 @@
 				}
 				this.scale = !this.scale;
 			},
+			addLink() {
+				this.openLinkAdd = true
+				this.$nextTick(function() {
+					this.$refs.MyLink.showModal();
+				})
+			},
 			showModal() {
 				this.$refs.myModal.showModal();
 			},
@@ -90,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() {
@@ -107,9 +119,12 @@
 				colMini: screenConfig.colMini,
 				colApiLeft: screenConfig.colApiLeft,
 				colApiRight: screenConfig.colApiRight,
-				colApiMain: screenConfig.colApiMain
+				colApiMain: screenConfig.colApiMain,
+				openLinkAdd: false,
+				openMessage: false,
 			}
-		}
+		},
+
 	}
 </script>
 

--
Gitblit v1.9.1