Commit 4de6e42a authored by zhuyangbin's avatar zhuyangbin

视频上传组件

parent fd76d883
...@@ -264,4 +264,13 @@ export const config: any = { ...@@ -264,4 +264,13 @@ export const config: any = {
// getFormatter: GetFormatter.REGION, // getFormatter: GetFormatter.REGION,
icon: 'iconziduan-lianxiangdanxuan', icon: 'iconziduan-lianxiangdanxuan',
}, },
26: {
name: '视频上传',
editComp: ApolloUpload,
cellComp: ApolloUpload,
setFormatter: SetFormatter.UPLOAD,
getFormatter: GetFormatter.UPLOAD,
detailComp: ApolloUploadDetail,
icon: 'iconziduan-fujian',
},
}; };
...@@ -10,8 +10,8 @@ export default class uploadDetail extends React.Component { ...@@ -10,8 +10,8 @@ export default class uploadDetail extends React.Component {
}; };
onPreview = (url:string, name:string) => { onPreview = (url:string, name:string) => {
const nameTypeArr = name.match(/\.[a-zA-Z]+$/); const nameTypeArr = name.match(/\.[a-zA-Z0-9]+$/);
const urlTypeArr = url.match(/\.[a-zA-Z]+$/); const urlTypeArr = url.match(/\.[a-zA-Z0-9]+$/);
const typeArr = nameTypeArr || urlTypeArr; const typeArr = nameTypeArr || urlTypeArr;
let type = typeArr && typeArr[0] ? typeArr[0].replace('.', '') : ''; let type = typeArr && typeArr[0] ? typeArr[0].replace('.', '') : '';
type = type.toLowerCase(); type = type.toLowerCase();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment