From 87317f44d9cc20ad70b6971168667e1c843e03d8 Mon Sep 17 00:00:00 2001 From: inleft <inleft@qq.com> Date: Fri, 26 Aug 2022 01:16:50 +0800 Subject: [PATCH] 添加上传进度条 添加日志统计文字 --- src/components/mini/box12-comment.vue | 68 +++++++++++++++++++++++++++++----- 1 files changed, 58 insertions(+), 10 deletions(-) diff --git a/src/components/mini/box12-comment.vue b/src/components/mini/box12-comment.vue index 9e748ed..c3d651a 100644 --- a/src/components/mini/box12-comment.vue +++ b/src/components/mini/box12-comment.vue @@ -6,7 +6,7 @@ </a-collapse-panel> </a-collapse> <div v-else> - <replyBox ref="commentBoxId" v-bind="$attrs" @sendMsg="sendMsg()" ></replyBox> + <replyBox ref="commentBoxId" v-bind="$attrs" @sendMsg="sendMsg()"></replyBox> </div> <a-modal v-model="visible" :title="replyTaget" :footer="null" @@ -114,12 +114,34 @@ default: false, }, }, + mounted() { + let packages = Object.keys(OwOjsonConfig) + for (let i = 0; i < packages.length; i++) { + let opackage = OwOjsonConfig[packages[i]].container + let type = OwOjsonConfig[packages[i]].type + for (let j = 0; j < opackage.length; j++) { + if (type == 'image') { + this.myOwOConfig[opackage[j].data] = `<img loading="lazy" class="biaoqing ` + opackage[j].css + + `" src="` + opackage[j].icon + `">` + } + } + } + }, methods: { parseContent(content) { - let tempStrArray=content.match("\:\&\(.*\)"); - - console.log(OwOjsonConfig); - console.log(333); + let tempStrArray = content.match(this.re); + + if (tempStrArray == null) { + return content; + } + + for (var i = 0; i < tempStrArray.length; i++) { + if (this.myOwOConfig[tempStrArray[i]] == undefined || this.myOwOConfig[tempStrArray[i]] == null) { + continue; + } + content = content.replace(tempStrArray[i], this.myOwOConfig[tempStrArray[i]]) + } + return content; }, updateCommentList(articleId) { @@ -182,16 +204,31 @@ replyTaget: "", visible: false, commentListData: [], + myOwOConfig: {}, + re: new RegExp(":&\\(\\S*?\\)", "g"), } } } </script> <style lang="less"> - .myContent img { - margin-bottom: -0.125rem; - img min-height: 3.5rem; + img.biaoqing.quyin { + margin-bottom: 0.2rem; + min-height: 2.5rem; height: 2em; + } + + .ant-comment img, + .myContent img { + margin-bottom: 0.2rem; + min-height: 2.5rem; + height: 2em; + } + + .myContent { + * { + max-width: 100% !important; + } } .samllPadding { @@ -233,6 +270,8 @@ justify-content: flex-end; } + + .commentList { a { color: black; @@ -269,9 +308,14 @@ } .commentGroup { - border-top: 1px solid #e5e9ef; - margin-bottom: 5px; padding-bottom: 0px; + border-bottom: 1px solid #e5e9ef; + } + + .commentGroup:hover { + background: #e5e9ef; + border-radius: 14px; + border-bottom:none } .ant-comment-content-detail { @@ -282,5 +326,9 @@ margin-bottom: 0px; } } + + + + } </style> -- Gitblit v1.9.1