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={(