+
{getFieldDecorator('description', {
rules: [
{
@@ -136,12 +136,12 @@ function New(props){
message:"请输入描述内容"
}
]})(
- ,
+ ,
)}
{getFieldDecorator('paper_content', {rules:[]})(
- ,
+ ,
)}
diff --git a/src/forge/Dataset/component/uploadModal.jsx b/src/forge/Dataset/component/uploadModal.jsx
index 7d8ffa3d..b76ab339 100644
--- a/src/forge/Dataset/component/uploadModal.jsx
+++ b/src/forge/Dataset/component/uploadModal.jsx
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react';
-import { Upload ,Form ,Input , Button } from 'antd';
+import { Upload ,Form ,Input , Button , message } from 'antd';
import '../index.scss';
import { Link } from 'react-router-dom';
import axios from 'axios';
@@ -53,13 +53,28 @@ function UploadModal(props){
}
})
}
+ function isFolder(fileName) {
+ // 获取文件名中最后一个点的位置
+ const lastDotIndex = fileName.lastIndexOf('.');
+ // 获取文件名中最后一个斜杠(如果有的话)之后的部分
+ const nameAfterLastSlash = fileName.substring(fileName.lastIndexOf('/') + 1);
+ // 如果最后一个点之后有内容,且该部分不是文件夹名称的一部分,则可能是文件
+ return lastDotIndex !== -1 && nameAfterLastSlash.includes('.');
+ }
const upload= {
name: 'file',
multiple: false,
maxCount:1,
+ type:"file",
beforeUpload: file => {
- setFileList([file]);
+ const isDirectory = file.type;
+ const name = file.name;
+ if (!isDirectory && !isFolder(name)) {
+ message.error('不能上传文件夹!');
+ }else{
+ setFileList([file]);
+ }
return false;
},
onRemove: file => {
diff --git a/src/forge/Dataset/image/paperImg.png b/src/forge/Dataset/image/paperImg.png
new file mode 100644
index 0000000000000000000000000000000000000000..7be684fd494dd8d35480d02b8223f23437744b9a
GIT binary patch
literal 468
zcmV;_0W1EAP)Px$j!8s8R5(xVmAy+_VHC!HPrQMk4jCLA94t7vNV66*=q3uH*r9?;z(2sP9lDhM
z10A~StU&~cI0z}2fI|j{c1!UN4i1ijVy^coH)%@z3_+*jyS?xEc+SUj&MScJ{lm9$
zq!mOS7zRd@cjGHrbwtf*=U4xADS4l`OfSW;7ld-iW1s*Wflh6QC{+o>#^UVcZ*7&T
zUxhy>hTV?gSSEuQzoQ%4L{c-bpe1v1|DP4?5s$sr&IuZmi{w8Vg
zB>;LRR6B$9^>U_An7(@PCP!{e1WJFjJ%duKlGh$*k+~p6tuqbB1ZqwAgU9x{q@lL3
zIsGW}7)>|c&*ckuJrzrpllJ=Pv4*z?tr-pac`E~+&Y%n6^C$TgpvRuxQ%`zO-Gw-3
zE0m}M3C+$rXg3PZf<}y+ACXWfyKX7b{kKVthh=ADG@{l=bnplM-1D$~;Z7g`0000<
KMNUMnLSTYS49W8V
literal 0
HcmV?d00001
diff --git a/src/forge/Dataset/index.scss b/src/forge/Dataset/index.scss
index 24442e2d..ee9ce2ad 100644
--- a/src/forge/Dataset/index.scss
+++ b/src/forge/Dataset/index.scss
@@ -4,7 +4,7 @@
padding:25px 0px;
.mnistData{
background: #FAFCFF;
- border-radius: 3px 3px 0px 0px;
+ border-radius: 3px;
border: 1px solid rgba(42,97,255,0.23);
padding:20px;
display: flex;
@@ -16,9 +16,20 @@
color: #202D40;
line-height: 22px;
&:first-child{
- margin-bottom: 15px!important;
+ max-width: 600px;
}
}
+ .license{
+ height: 40px;
+ line-height: 40px;
+ background: #ECEFFE;
+ border-radius: 6px 6px 6px 6px;
+ padding:0px 12px;
+ font-weight: bold;
+ font-size: 15px;
+ color: #202D40;
+ display: inline-block;
+ }
}
.datasetTable{
.ant-table-thead > tr > th{
diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js
index 677f753e..ac9e7496 100644
--- a/src/forge/Main/Detail.js
+++ b/src/forge/Main/Detail.js
@@ -564,6 +564,7 @@ class Detail extends Component {
const common = {
getDetail: this.getDetail,
getBanner: this.getBanner,
+ getProject:this.getProject,
changeOpenDevops: this.changeOpenDevops,
defaultBranch
}
diff --git a/src/forge/Main/list.scss b/src/forge/Main/list.scss
index 3232fc41..ae45f0c7 100644
--- a/src/forge/Main/list.scss
+++ b/src/forge/Main/list.scss
@@ -228,7 +228,7 @@
li{
text-align: center;
padding:0px;
- margin-right: 35px;
+ margin-right: 30px;
display: flex;
& > a{
position: relative;