From 43865206d6439dfec628e596bd8e8f95d64d19b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Tue, 11 Apr 2023 14:44:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86issue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/sub/UpdateDescModal.jsx | 3 +++ src/forge/topic/index.jsx | 6 ++---- src/forge/topic/index.scss | 4 ++++ src/softbot/softBotList/index.scss | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/forge/Main/sub/UpdateDescModal.jsx b/src/forge/Main/sub/UpdateDescModal.jsx index f0546bcee..0043b865a 100644 --- a/src/forge/Main/sub/UpdateDescModal.jsx +++ b/src/forge/Main/sub/UpdateDescModal.jsx @@ -37,10 +37,13 @@ function UpdateDescModal({form , visible , onCancel , onOk,desc,website,lesson_u // 校验项目标签 function checkTopics(rule, value, callback){ const boolLength = value.filter(item=>item.length > 20); + const bool = value.filter(item=>!/^(?![-])[a-zA-Z0-9\u4e00-\u9fa5\\-]+$/.test(item)); if(value.length > 5){ callback("最多创建5个标签"); }else if(boolLength.length){ callback("每个标签最多支持20个汉字"); + }else if(bool.length){ + callback("标签名只允许包含中文、字母、数字或者中划线(-), 不能以中划线开头"); } callback(); } diff --git a/src/forge/topic/index.jsx b/src/forge/topic/index.jsx index 792853fd8..af78de9bb 100644 --- a/src/forge/topic/index.jsx +++ b/src/forge/topic/index.jsx @@ -13,7 +13,6 @@ import Nodata from '../Nodata'; const Option = Select.Option; export default withRouter((CNotificationHOC()(SnackbarHOC()(TPMIndexHOC((props) => { - console.log('props', props); const {match:{params:{name, id}}, current_user:{user_id}} = props; const [languageList, setLanguageList] = useState(undefined); const [languageId, setLanguageId] = useState(undefined); @@ -44,7 +43,6 @@ export default withRouter((CNotificationHOC()(SnackbarHOC()(TPMIndexHOC((props) } }).then((result) => { if (result) { - console.log('result', result); setProjectsList(result.data.projects); setTotal(result.data.total_count); } @@ -57,7 +55,7 @@ export default withRouter((CNotificationHOC()(SnackbarHOC()(TPMIndexHOC((props)

#{decodeURIComponent(name)}

- 平台共6个项目与此标签相匹配 + 平台共{total}个公开项目与此标签相匹配