From 1169d092f3c0976a9af3dc79c3feb8057da17146 Mon Sep 17 00:00:00 2001
From: inleft <inleft@qq.com>
Date: Mon, 15 Aug 2022 18:45:38 +0800
Subject: [PATCH] 评论表情添加

---
 src/components/mini/box13-reply.vue |   61 ++++++++++++++++++++++++------
 1 files changed, 49 insertions(+), 12 deletions(-)

diff --git a/src/components/mini/box13-reply.vue b/src/components/mini/box13-reply.vue
index 4b2c896..8d8309d 100644
--- a/src/components/mini/box13-reply.vue
+++ b/src/components/mini/box13-reply.vue
@@ -15,18 +15,18 @@
 					<a-input v-model="form.homePage" placeholder="https:// or http://">
 					</a-input>
 				</a-form-model-item>
-				<a-form-model-item label="马甲认证" 
+				<a-form-model-item label="认证"
 					v-show="form.nickName=='inleft'||form.nickName=='笔墨'||form.nickName=='阿墨'">
-					<a-input-password v-model="form.authCode" autocomplete='new-password' type="password"
-						placeholder="我的授权码">
-						<a-icon slot="prefix" type="lock" style="color:rgba(0,0,0,.25)" />
-					</a-input-password>
+					<a-input v-model="form.authCode" autocomplete='new-password' type="password" placeholder="我的授权码">
+					</a-input>
 				</a-form-model-item>
 			</a-form-model>
 		</div>
+
 		<div class="replyMsgInfo" v-if="showReplyMsgInfo">
-			<div>{{msgInfo.useName}} </div>
-			<div style="padding: 0px 3px;"> : </div>
+			<div>
+				{{msgInfo.useName}}<span style="padding: 0px 3px;"> : </span>
+			</div>
 			<div>
 				<span v-html="msgInfo.userComment.replace(/\n/g, '<br>')"></span>
 			</div>
@@ -34,8 +34,11 @@
 		<a-comment>
 			<div slot="content">
 				<a-form-item>
-					<a-textarea :rows="4" v-model="form.visitorContent" :placeholder="replyHolder" />
+					<a-textarea :rows="4" v-model="form.visitorContent" :placeholder="replyHolder"
+						class="OwO-textarea" />
 				</a-form-item>
+				<div class="OwO"></div>
+
 				<div>
 					<a-button html-type="submit" type="primary" @click="send()" v-if="!showReplyMsgInfo"
 						:disabled="isSending || $attrs.isAllowedComment==0">
@@ -52,13 +55,14 @@
 					<a-checkbox v-model="form.isReceiveMail">
 						接收邮件回复通知
 					</a-checkbox>
-					<a-checkbox style=" margin-left: 8px;" v-if="!showReplyMsgInfo" v-model="form.isSecretMsg">
+					<a-checkbox v-if="!showReplyMsgInfo" v-model="form.isSecretMsg">
 						悄悄说..<span class="myTip">(仅登录后可查看)</span>
 					</a-checkbox>
 				</div>
 			</div>
 		</a-comment>
 	</div>
+
 </template>
 
 <script>
@@ -67,9 +71,26 @@
 	} from '../../api/blogArticleComment.js'
 	import md5 from 'js-md5';
 
+	import 'owo/dist/OwO.min.css';
+	import OwO from 'owo/dist/OwO.min.js';
+	// import OwO from '/public/OWO.js';
+
+
 	const VisitorDataKey = "visitorData.inleft.com"
 
 	export default {
+		mounted() {
+			var OwO_demo = new OwO({
+				logo: 'OωO表情',
+				container: document.getElementsByClassName('OwO')[0],
+				target: document.getElementsByClassName('OwO-textarea')[0],
+				api: './OwO.json',
+				// api: 'http://diygod.github.io/OwO/demo/OwO.json',
+				position: 'down',
+				width: '100%',
+				maxHeight: '250px'
+			});
+		},
 		methods: {
 			getMsgInfo(param) {
 				this.msgInfo = param;
@@ -174,7 +195,7 @@
 				nickName: "",
 				eMail: "",
 				homePage: "",
-				isReceiveMail: true,
+				isReceiveMail: false,
 				isSecretMsg: false,
 				visitorContent: "",
 				parentId: 0,
@@ -232,8 +253,8 @@
 					}],
 					"homePage": [{
 						trigger: 'blur',
-						pattern: /^((https|http)?:\/\/)[^\s]+/,
-						message: '仅支持 https | http'
+						pattern: /^((https|http)?:\/\/)+/,
+						message: '仅支持 https:// | http://'
 					}, {
 						trigger: 'blur',
 						max: 50,
@@ -248,10 +269,26 @@
 <style lang="less">
 	.replyMsgInfo {
 		display: flex;
+		flex-direction: column;
 		border-radius: 4px;
 		box-shadow: 0px 9px 10px 0 rgba(0, 0, 0, 0.24), 1px 3px 15px 0 rgba(0, 0, 0, 0.19);
 		padding: 20px 25px 20px;
 		margin-left: 15px;
 		margin-top: 10px;
 	}
+
+	.OwO {
+		padding: 0px 0px 20px 0px;
+	}
+
+	.OwO .OwO-logo {
+		height: 30px;
+	}
+
+	.OwO .quyin,
+	.OwO img {
+		margin-bottom: -0.125rem;
+		min-height: 3.5rem;
+		height: 1em;
+	}
 </style>

--
Gitblit v1.9.1