From 85f95ff89ca806bf0618d79fdc6fda4d6dbd6b57 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Sat, 28 May 2022 17:05:45 +0800 Subject: [PATCH] no message --- package.json | 2 +- .../assets/js/components/Mobile/Back.vue | 4 +- .../manage/components/ChatInput/index.vue | 89 +++-- .../pages/manage/components/DialogWrapper.vue | 29 +- .../sass/pages/components/chat-input.scss | 310 +++++++++--------- .../sass/pages/components/dialog-wrapper.scss | 3 +- 6 files changed, 242 insertions(+), 195 deletions(-) diff --git a/package.json b/package.json index e702909e6..870ff62bb 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "notification-koro1": "^1.1.1", "postcss": "^8.4.5", "quill": "^1.3.7", - "quill-mention": "^3.1.0", + "quill-mention-hi": "^3.1.0-1", "resolve-url-loader": "^4.0.0", "sass": "^1.45.1", "sass-loader": "^12.4.0", diff --git a/resources/assets/js/components/Mobile/Back.vue b/resources/assets/js/components/Mobile/Back.vue index 898b04737..fc3d5f6fc 100644 --- a/resources/assets/js/components/Mobile/Back.vue +++ b/resources/assets/js/components/Mobile/Back.vue @@ -59,7 +59,9 @@ export default { }, touchmove(event) { - this.getXY(event) + if (this.show) { + this.getXY(event) + } }, touchend() { diff --git a/resources/assets/js/pages/manage/components/ChatInput/index.vue b/resources/assets/js/pages/manage/components/ChatInput/index.vue index 90d7ef8cd..cc3d8fc38 100755 --- a/resources/assets/js/pages/manage/components/ChatInput/index.vue +++ b/resources/assets/js/pages/manage/components/ChatInput/index.vue @@ -105,7 +105,7 @@ diff --git a/resources/assets/sass/pages/components/chat-input.scss b/resources/assets/sass/pages/components/chat-input.scss index 9652d5f08..25e64906f 100755 --- a/resources/assets/sass/pages/components/chat-input.scss +++ b/resources/assets/sass/pages/components/chat-input.scss @@ -1,5 +1,5 @@ @import "~quill/dist/quill.bubble.css"; -@import "~quill-mention/dist/quill.mention.min.css"; +@import "~quill-mention-hi/dist/quill.mention.min.css"; .chat-input-box { display: inline-block; @@ -7,6 +7,9 @@ &.record-ing { .chat-input-wrapper { + .ql-container { + opacity: 0; + } .chat-toolbar { > li { &.chat-send { @@ -15,29 +18,8 @@ } } &.chat-record-recwave { - display: flex; - } - } - } - } - } - - &.task-mention { - .chat-input-wrapper { - .ql-container { - .ql-mention-list-container { - .ql-mention-list { - > li { - &:first-child { - margin-top: 0; - } - } - } - .ql-mention-list-item { - line-height: 36px; - .mention-item-disabled { - padding: 8px 4px 0; - } + visibility: visible; + opacity: 1; } } } @@ -102,136 +84,6 @@ } } } - - .ql-mention-list-container { - width: auto; - min-width: 220px; - max-width: 280px; - max-height: 360px; - //noinspection CssInvalidPropertyValue - overflow-y: overlay; - - &::-webkit-scrollbar { - width: 10px; - height: 10px; - } - - &::-webkit-scrollbar-thumb { - border-radius: 10px; - background: rgba(0, 0, 0, 0); - } - - &::-webkit-scrollbar-thumb:active { - border-radius: 10px; - background: rgba(0, 0, 0, .5); - } - - &:hover::-webkit-scrollbar-thumb { - border: 2px solid transparent; - background: rgba(0, 0, 0, .2); - background-clip: content-box; - } - - &:hover::-webkit-scrollbar-thumb:hover { - border-top-width: 0; - border-bottom-width: 0; - } - - &::-webkit-scrollbar-track { - border-radius: 10px; - background: rgba(0, 0, 0, 0); - } - - .ql-mention-list { - > li { - &:first-child { - margin-top: 8px; - } - &:last-child { - margin-bottom: 8px; - } - } - } - - .ql-mention-list-item { - padding: 0 8px; - display: flex; - align-items: center; - margin: 0 8px; - - &.selected { - border-radius: 4px; - } - - .mention-item-at { - width: 28px; - height: 28px; - line-height: 28px; - border-radius: 50%; - text-align: center; - color: #ffffff; - background-color: $primary-color; - overflow: hidden; - } - - .mention-item-img { - position: relative; - display: flex; - align-items: center; - justify-content: center; - - > img { - width: 28px; - height: 28px; - border-radius: 50%; - overflow: hidden; - } - - > em { - position: absolute; - right: 0; - bottom: 0; - width: 8px; - height: 8px; - border-radius: 50%; - background-color: #ff9900; - border: 1px solid #ffffff; - transform-origin: right bottom; - z-index: 1; - } - - &.online { - > em { - background-color: $primary-color; - } - } - } - - .mention-item-name { - padding: 0 8px; - font-size: 14px; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } - - .mention-item-tip { - color: #8f8f8e; - font-size: 12px; - font-style: normal; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } - - .mention-item-disabled { - color: #aaa; - font-size: 12px; - padding: 0 4px; - line-height: 40px; - } - } - } } .ql-bubble { @@ -245,6 +97,7 @@ display: flex; align-items: center; justify-content: flex-end; + user-select: none; > li { width: 30px; height: 30px; @@ -297,10 +150,12 @@ height: 100%; width: 100%; background-color: #ffffff; - display: none; flex-direction: column; align-items: center; justify-content: center; + pointer-events: none; + visibility: hidden; + opacity: 0; > div { flex: 1; width: 100%; @@ -499,6 +354,151 @@ } } +.ql-mention-list-container { + width: auto; + min-width: 220px; + max-width: 280px; + max-height: 360px; + overflow-y: overlay; + + &.task-mention { + .ql-mention-list { + > li { + &:first-child { + margin-top: 0; + } + } + } + .ql-mention-list-item { + line-height: 36px; + .mention-item-disabled { + padding: 8px 4px 0; + } + } + } + + &::-webkit-scrollbar { + width: 10px; + height: 10px; + } + + &::-webkit-scrollbar-thumb { + border-radius: 10px; + background: rgba(0, 0, 0, 0); + } + + &::-webkit-scrollbar-thumb:active { + border-radius: 10px; + background: rgba(0, 0, 0, .5); + } + + &:hover::-webkit-scrollbar-thumb { + border: 2px solid transparent; + background: rgba(0, 0, 0, .2); + background-clip: content-box; + } + + &:hover::-webkit-scrollbar-thumb:hover { + border-top-width: 0; + border-bottom-width: 0; + } + + &::-webkit-scrollbar-track { + border-radius: 10px; + background: rgba(0, 0, 0, 0); + } + + .ql-mention-list { + > li { + &:first-child { + margin-top: 8px; + } + &:last-child { + margin-bottom: 8px; + } + } + } + + .ql-mention-list-item { + padding: 0 8px; + display: flex; + align-items: center; + margin: 0 8px; + + &.selected { + border-radius: 4px; + } + + .mention-item-at { + width: 28px; + height: 28px; + line-height: 28px; + border-radius: 50%; + text-align: center; + color: #ffffff; + background-color: $primary-color; + overflow: hidden; + } + + .mention-item-img { + position: relative; + display: flex; + align-items: center; + justify-content: center; + + > img { + width: 28px; + height: 28px; + border-radius: 50%; + overflow: hidden; + } + + > em { + position: absolute; + right: 0; + bottom: 0; + width: 8px; + height: 8px; + border-radius: 50%; + background-color: #ff9900; + border: 1px solid #ffffff; + transform-origin: right bottom; + z-index: 1; + } + + &.online { + > em { + background-color: $primary-color; + } + } + } + + .mention-item-name { + padding: 0 8px; + font-size: 14px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + + .mention-item-tip { + color: #8f8f8e; + font-size: 12px; + font-style: normal; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + + .mention-item-disabled { + color: #aaa; + font-size: 12px; + padding: 0 4px; + line-height: 40px; + } + } +} + @media (max-width: 768px) { .chat-input-box { .chat-input-wrapper { diff --git a/resources/assets/sass/pages/components/dialog-wrapper.scss b/resources/assets/sass/pages/components/dialog-wrapper.scss index ea32a6956..71ec97690 100644 --- a/resources/assets/sass/pages/components/dialog-wrapper.scss +++ b/resources/assets/sass/pages/components/dialog-wrapper.scss @@ -451,7 +451,7 @@ flex-direction: row-reverse; justify-content: flex-end; align-content: center; - color: #ffffff; + color: #333333; line-height: 20px; cursor: pointer; @@ -691,6 +691,7 @@ .dialog-record { flex-direction: row; + color: #ffffff; .record-time { padding: 0 4px 0 0;