提交 584a23cb authored 作者: 徐立's avatar 徐立

调整移动端打包

上级 4b638163
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
*/ */
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Modal,Popconfirm } from 'antd'; import { Modal,Popconfirm } from 'antd';
import FileViewer from 'react-file-viewer'; const FileViewer=(CLIENT_TYPE=="mobile")?null:require('react-file-viewer')
export default class index extends Component { export default class index extends Component {
constructor(props){ constructor(props){
super(props) super(props)
...@@ -123,13 +124,13 @@ export default class index extends Component { ...@@ -123,13 +124,13 @@ export default class index extends Component {
height:600, height:600,
}} }}
> >
<FileViewer {FileViewer&&<FileViewer.default
fileType={type} fileType={type}
filePath={path} filePath={path}
// onError={this.onError} // onError={this.onError}
// errorComponent={Error} // errorComponent={Error}
// unsupportedComponent={Error} // unsupportedComponent={Error}
/> />}
</div> </div>
} }
......
...@@ -67,6 +67,7 @@ const base64 = baseX(Bs64) ...@@ -67,6 +67,7 @@ const base64 = baseX(Bs64)
import { Base16Encode } from "../Base16/index" import { Base16Encode } from "../Base16/index"
import { getToken } from '../utils/token'; import { getToken } from '../utils/token';
import { formulaList } from '../excelInitFuc/functionList'; import { formulaList } from '../excelInitFuc/functionList';
import FilePreview from '../filePreview';
const Item = MobileList.Item; const Item = MobileList.Item;
const Brief = Item.Brief; const Brief = Item.Brief;
function getBase64(value) { function getBase64(value) {
...@@ -1969,12 +1970,12 @@ closeModal=(callback)=>{ ...@@ -1969,12 +1970,12 @@ closeModal=(callback)=>{
if (f.path.indexOf('.png') != -1 || f.path.indexOf('.jpg') != -1) { if (f.path.indexOf('.png') != -1 || f.path.indexOf('.jpg') != -1) {
return <img key={index2} style={{ width: 100, height: 100 }} src={queryApiActionPath() + f.path} /> return <img key={index2} style={{ width: 100, height: 100 }} src={queryApiActionPath() + f.path} />
} }
// if(!config.babelMobile &&get === 'web'){ if(get === 'web'){
// return <li key={index2}><FilePreview.default return <li key={index2}><FilePreview
// path={queryApiActionPath() + f.path} path={queryApiActionPath() + f.path}
// pathName={f.name} pathName={f.name}
// /></li> /></li>
// } }
return <li key={index2}><a target="_blank" key={f.path} href={queryApiActionPath() + f.path}> return <li key={index2}><a target="_blank" key={f.path} href={queryApiActionPath() + f.path}>
{f.name} {f.name}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论