From 928235eac8e412ecdbcb54826e378c718d53efa1 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Mon, 7 Apr 2025 16:22:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E6=A1=86=E6=97=A0=E6=B3=95=E7=82=B9=E5=87=BB=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manage/components/ChatInput/index.vue | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/resources/assets/js/pages/manage/components/ChatInput/index.vue b/resources/assets/js/pages/manage/components/ChatInput/index.vue index dca281c0d..c03418734 100755 --- a/resources/assets/js/pages/manage/components/ChatInput/index.vue +++ b/resources/assets/js/pages/manage/components/ChatInput/index.vue @@ -1062,6 +1062,27 @@ export default { return delta }) + // Link handler + const toolbar = this.quill.getModule('toolbar') + if (toolbar?.handlers?.link) { + toolbar.addHandler('link', (value) => { + if (value) { + $A.modalInput({ + title: "插入链接", + placeholder: "请输入完整的链接地址", + onOk: (link) => { + if (!link) { + return false; + } + this.quill.format('link', link); + } + }) + } else { + this.quill.format('link', false); + } + }); + } + // Set enterkeyhint this.$nextTick(_ => { if (this.$isEEUiApp && this.cacheKeyboard.send_button_app === 'enter') {