diff --git a/model/channel.go b/model/channel.go index f8e1cccc..39cbc022 100644 --- a/model/channel.go +++ b/model/channel.go @@ -47,6 +47,7 @@ type Channel struct { Setting *string `json:"setting" gorm:"type:text"` // 渠道额外设置 ParamOverride *string `json:"param_override" gorm:"type:text"` HeaderOverride *string `json:"header_override" gorm:"type:text"` + Remark string `json:"remark,omitempty" gorm:"type:varchar(255)" validate:"max=255"` // add after v0.8.5 ChannelInfo ChannelInfo `json:"channel_info" gorm:"type:json"` diff --git a/web/src/components/table/channels/ChannelsColumnDefs.jsx b/web/src/components/table/channels/ChannelsColumnDefs.jsx index 2230877c..56f745c2 100644 --- a/web/src/components/table/channels/ChannelsColumnDefs.jsx +++ b/web/src/components/table/channels/ChannelsColumnDefs.jsx @@ -35,6 +35,8 @@ import { renderQuota, getChannelIcon, renderQuotaWithAmount, + showSuccess, + showError, } from '../../../helpers'; import { CHANNEL_OPTIONS } from '../../../constants'; import { IconTreeTriangleDown, IconMore } from '@douyinfe/semi-icons'; @@ -216,6 +218,39 @@ export const getChannelsColumns = ({ key: COLUMN_KEYS.NAME, title: t('名称'), dataIndex: 'name', + render: (text, record, index) => { + if (record.remark && record.remark.trim() !== '') { + return ( + +
{record.remark}
+ + + } + trigger='hover' + position='topLeft' + > + {text} +
+ ); + } + return text; + }, }, { key: COLUMN_KEYS.GROUP, diff --git a/web/src/components/table/channels/modals/EditChannelModal.jsx b/web/src/components/table/channels/modals/EditChannelModal.jsx index de2c7021..7a86fa11 100644 --- a/web/src/components/table/channels/modals/EditChannelModal.jsx +++ b/web/src/components/table/channels/modals/EditChannelModal.jsx @@ -1993,6 +1993,14 @@ const EditChannelModal = (props) => { showClear onChange={(value) => handleInputChange('tag', value)} /> + handleInputChange('remark', value)} + />