From f5dd9b84b19a0a791d4ab03b877910dc46eac950 Mon Sep 17 00:00:00 2001
From: yangyin <1850366751@qq.com>
Date: 星期四, 31 十月 2024 16:13:03 +0800
Subject: [PATCH] 添加静态常用语的弹窗

---
 src/components/chat/components/playBar/phrase/CommonPhrases.vue |   35 +++++++++++++++++++++++++++++++++--
 1 files changed, 33 insertions(+), 2 deletions(-)

diff --git a/src/components/chat/components/playBar/phrase/CommonPhrases.vue b/src/components/chat/components/playBar/phrase/CommonPhrases.vue
index b99dd18..267c41e 100644
--- a/src/components/chat/components/playBar/phrase/CommonPhrases.vue
+++ b/src/components/chat/components/playBar/phrase/CommonPhrases.vue
@@ -24,14 +24,29 @@
 				</div>
 			</div>
 		</div>
-		<div class="container_add">
+		<div class="container_add" @click="addCommonPhrases">
 			<span class="ywifont ywicon-jia text-[15px] cursor-pointer text-[#767a97]"></span>
+			<div class="grow">娣诲姞甯哥敤璇�</div>
 		</div>
+		<el-dialog v-model="state.useCommonPhrasesDialog" :title="state?.sample_title" width="500" :before-close="handleClose">
+			<el-input v-model="state.inputCommonPhrases" :rows="10" type="textarea"></el-input>
+			<template #footer>
+				<div class="dialog-footer">
+					<el-button @click="handleClose">鍙栨秷</el-button>
+					<el-button type="primary" @click="submitCommonPhrases"> 娣诲姞 </el-button>
+				</div>
+			</template>
+		</el-dialog>
 	</div>
 </template>
 
 <script setup lang="ts">
-import { ref } from 'vue';
+import { reactive, ref } from 'vue';
+const state = reactive({
+	useCommonPhrasesDialog: false,
+	sample_title: '娣诲姞甯哥敤璇�',
+	inputCommonPhrases: '',
+});
 const commonPhrases = ref([
 	{
 		id: 1,
@@ -51,6 +66,16 @@
 ]);
 const props = defineProps(['isHome']);
 const closeCommonPhrases = () => {};
+//鍏抽棴甯哥敤璇脊绐�
+const handleClose = () => {
+	state.useCommonPhrasesDialog = false;
+};
+//鎵撳紑甯哥敤璇脊绐�
+const addCommonPhrases = () => {
+	state.useCommonPhrasesDialog = true;
+};
+//鎻愪氦甯哥敤璇�
+const submitCommonPhrases = () => {};
 </script>
 <style scoped lang="scss">
 .container {
@@ -104,6 +129,9 @@
 				background: #fff;
 				border-radius: 8px;
 				width: 100%;
+				&:hover {
+					background: #e5e7ed;
+				}
 				.title {
 					font-size: 14px;
 					color: #060607;
@@ -133,6 +161,9 @@
 		padding: 6px 8px;
 		background: #fff;
 		border-radius: 8px;
+		&:hover {
+			background: #e5e7ed;
+		}
 	}
 }
 </style>

--
Gitblit v1.9.3