From 15a36a65b3967382425899670fa396dfcb71e803 Mon Sep 17 00:00:00 2001 From: AAEE86 Date: Sun, 24 Aug 2025 01:09:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=9C=A8=E6=96=B0=E5=A2=9E&=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E6=B8=A0=E9=81=93=E6=97=B6=E6=B7=BB=E5=8A=A0=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E6=A8=A1=E5=9E=8B=E5=A4=8D=E5=88=B6=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit c4935f392fbffc080359e82b7aa9cca91f009639) --- i18n/zh-cn.json | 4 ++- .../channels/modals/EditChannelModal.jsx | 25 +++++++++++++++++++ web/src/i18n/locales/en.json | 4 ++- 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/i18n/zh-cn.json b/i18n/zh-cn.json index dc7a1e4c..6c48b4ab 100644 --- a/i18n/zh-cn.json +++ b/i18n/zh-cn.json @@ -1050,5 +1050,7 @@ "已绑定的邮箱账户": "已绑定的邮箱账户", "已绑定的 Telegram 账户": "已绑定的 Telegram 账户", "新额度": "新额度", - "需要添加的额度(支持负数)": "需要添加的额度(支持负数)" + "需要添加的额度(支持负数)": "需要添加的额度(支持负数)", + "点击复制模型名称": "点击复制模型名称", + "已复制:{{name}}": "已复制:{{name}}" } \ No newline at end of file diff --git a/web/src/components/table/channels/modals/EditChannelModal.jsx b/web/src/components/table/channels/modals/EditChannelModal.jsx index b4e5a403..83590633 100644 --- a/web/src/components/table/channels/modals/EditChannelModal.jsx +++ b/web/src/components/table/channels/modals/EditChannelModal.jsx @@ -1485,6 +1485,31 @@ const EditChannelModal = (props) => { optionList={modelOptions} style={{ width: '100%' }} onChange={(value) => handleInputChange('models', value)} + renderSelectedItem={(optionNode) => { + const modelName = String(optionNode?.value ?? ''); + return { + isRenderInTag: true, + content: ( + { + e.stopPropagation(); + const ok = await copy(modelName); + if (ok) { + showSuccess(t('已复制:{{name}}', { name: modelName })); + } else { + showError(t('复制失败')); + } + }} + > + {optionNode.label || modelName} + + ), + }; + }} extraText={(