From 335c82e08afb33845c5f7a4360c2add740cb28aa Mon Sep 17 00:00:00 2001 From: zhangdaiscott Date: Mon, 24 Oct 2022 18:39:36 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E9=87=8D=E8=A6=81=E6=80=A7=E8=83=BD?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E3=80=91=E8=A7=A3=E5=86=B3=E7=82=B9=E5=87=BB?= =?UTF-8?q?online=E5=8A=9F=E8=83=BD=E6=B5=8B=E8=AF=95=EF=BC=8C=E9=87=8D?= =?UTF-8?q?=E6=96=B0=E5=8A=A0=E8=BD=BD=E9=A6=96=E9=A1=B5=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20issues/I5XBZF=20src\settings\registerThirdComp.ts=20src\comp?= =?UTF-8?q?onents\jeecg\comment\useComment.ts=20src\components\jeecg\comme?= =?UTF-8?q?nt\MyComment.vue=20src\components\jeecg\comment\DataLogList.vue?= =?UTF-8?q?=20src\components\jeecg\comment\CommentList.vue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/jeecg/comment/CommentList.vue | 21 ++++++++------- src/components/jeecg/comment/DataLogList.vue | 18 ++++++------- src/components/jeecg/comment/MyComment.vue | 9 +++---- src/components/jeecg/comment/useComment.ts | 17 +++--------- src/settings/registerThirdComp.ts | 27 ++++++++++++++++++++ 5 files changed, 56 insertions(+), 36 deletions(-) diff --git a/src/components/jeecg/comment/CommentList.vue b/src/components/jeecg/comment/CommentList.vue index 3afcd3e..5b02bba 100644 --- a/src/components/jeecg/comment/CommentList.vue +++ b/src/components/jeecg/comment/CommentList.vue @@ -75,15 +75,15 @@ /** * 评论列表 */ - import { defineComponent, ref, onMounted, watch, watchEffect } from 'vue'; + import { defineComponent, ref, onMounted, watch, watchEffect ,inject } from 'vue'; import { propTypes } from '/@/utils/propTypes'; - import dayjs from 'dayjs'; - import 'dayjs/locale/zh.js'; - import relativeTime from 'dayjs/plugin/relativeTime'; - import customParseFormat from 'dayjs/plugin/customParseFormat'; - dayjs.locale('zh'); - dayjs.extend(relativeTime); - dayjs.extend(customParseFormat); + // import dayjs from 'dayjs'; + // import relativeTime from 'dayjs/plugin/relativeTime'; + // import customParseFormat from 'dayjs/plugin/customParseFormat'; + // dayjs.locale('zh'); + // dayjs.extend(relativeTime); + // dayjs.extend(customParseFormat); + import { MessageOutlined } from '@ant-design/icons-vue'; import { Comment, Tooltip } from 'ant-design-vue'; import { useUserStore } from '/@/store/modules/user'; @@ -113,6 +113,8 @@ const { createMessage } = useMessage(); const dataList = ref([]); const { userInfo } = useUserStore(); + const dayjs = inject('$dayjs') + /** * 获取当前用户名称 */ @@ -245,7 +247,8 @@ } }); - const { getHtml } = useEmojiHtml(); + const storageEmojiIndex = inject('$globalEmojiIndex') + const { getHtml } = useEmojiHtml(storageEmojiIndex); const bottomCommentRef = ref() function handleClickItem(){ bottomCommentRef.value.changeActive() diff --git a/src/components/jeecg/comment/DataLogList.vue b/src/components/jeecg/comment/DataLogList.vue index 22fa619..7cee493 100644 --- a/src/components/jeecg/comment/DataLogList.vue +++ b/src/components/jeecg/comment/DataLogList.vue @@ -28,16 +28,15 @@