|
@@ -83,7 +83,7 @@ function FlieBox(props: Props) {
|
|
|
</> : <>
|
|
|
<li onClick={() => { editFile() }}>编辑</li>
|
|
|
</>}
|
|
|
- {mediaType !== 'PAGE' && !rightClickPup.folder && <li onClick={()=>{copy(rightClickPup?.url)}}>复制链接</li>}
|
|
|
+ {mediaType !== 'PAGE' && !rightClickPup.folder && <li onClick={() => { copy(rightClickPup?.url) }}>复制链接</li>}
|
|
|
<li onClick={() => { set({ actionItem: rightClickPup, sortVisible: true }) }}>编辑排序</li>
|
|
|
<li onClick={() => { set({ fileVisible: true }) }}>新建文件夹</li>
|
|
|
<li onClick={() => { set({ imgVisrible: true }) }}>新建素材</li>
|
|
@@ -178,11 +178,11 @@ function FlieBox(props: Props) {
|
|
|
}
|
|
|
}, [folderId, moveId, mediaType])
|
|
|
|
|
|
- return <div style={{ display: 'flex', flexFlow: 'row' }}>
|
|
|
+ return <div style={{ display: 'flex', flexFlow: 'row', width: '100%' }}>
|
|
|
{get_folder_tree?.data?.length > 0 && <div style={{ flexShrink: 0 }}>
|
|
|
{treeEl}
|
|
|
</div>}
|
|
|
- <div style={{ flexShrink: 1 }}>
|
|
|
+ <div style={{ flex: 1, paddingTop: 10 }}>
|
|
|
<div className={style.files} onContextMenu={rightMenu} style={height ? { height } : {}}>
|
|
|
{/* 关联公众号筛选 */}
|
|
|
<div className={style.wxSelect}>
|
|
@@ -230,9 +230,6 @@ function FlieBox(props: Props) {
|
|
|
e.preventDefault()
|
|
|
}}
|
|
|
>
|
|
|
- {/* {isAll && <span className={`${style.select}`} onClick={(e) => { changeClickFile(e, item, isAll, noFile) }}>
|
|
|
- <span role="img" aria-label="check" style={{ color: '#fff' }}><svg viewBox="64 64 896 896" focusable="false" data-icon="check" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"></path></svg></span>
|
|
|
- </span>} */}
|
|
|
<img src={fileImg}
|
|
|
className={style.flex_box_img}
|
|
|
onClick={(e: any) => { e.stopPropagation(); fileClick(item) }}
|
|
@@ -286,28 +283,46 @@ function FlieBox(props: Props) {
|
|
|
switch (topPageElements?.elementType) {
|
|
|
case 'TOP_IMAGE':
|
|
|
topName = "顶部图片"
|
|
|
- El = <Image src={topPageElements?.topImageSpec?.imageUrl} preview={{ visible: false }} onClick={(e) => { e.stopPropagation(); setPage && setPage(1, item.id) }} />
|
|
|
+ El = <Image
|
|
|
+ src={topPageElements?.topImageSpec?.imageUrl}
|
|
|
+ preview={{ visible: false, maskClassName: style.maskClass }}
|
|
|
+ onClick={(e) => {
|
|
|
+ e.stopPropagation()
|
|
|
+ let className = (e.target as any).className
|
|
|
+ if (className === 'ant-image-mask-info') {
|
|
|
+ setPage && setPage(1, item.id)
|
|
|
+ } else {
|
|
|
+ changeClickFile(e, item, isAll, noFile)
|
|
|
+ }
|
|
|
+ }}
|
|
|
+ />
|
|
|
break
|
|
|
case 'TOP_SLIDER':
|
|
|
topName = "顶部轮播图"
|
|
|
El = <>
|
|
|
<Carousel autoplay style={{ width: 150, textAlign: 'center' }}>
|
|
|
{topPageElements?.topSliderSpec?.imageUrlList?.map((url: string, index: number) => <div key={index}>
|
|
|
- <Image preview={{ visible: false }} src={url} onClick={(e) => { e.stopPropagation(); /*setImgVisible(true)*/ setPage && setPage(1, item.id) }} />
|
|
|
+ <Image
|
|
|
+ preview={{ visible: false, maskClassName: style.maskClass }}
|
|
|
+ src={url}
|
|
|
+ onClick={(e) => {
|
|
|
+ e.stopPropagation()
|
|
|
+ let className = (e.target as any).className
|
|
|
+ if (className === 'ant-image-mask-info') {
|
|
|
+ setPage && setPage(1, item.id)
|
|
|
+ } else {
|
|
|
+ changeClickFile(e, item, isAll, noFile)
|
|
|
+ }
|
|
|
+ }} />
|
|
|
</div>)}
|
|
|
</Carousel>
|
|
|
- {/* <div style={{ display: 'none' }}>
|
|
|
- <Image.PreviewGroup preview={{ visible: imgVisible, onVisibleChange: vis => setImgVisible(vis) }}>
|
|
|
- {topPageElements?.topSliderSpec?.imageUrlList?.map((item: string, index: number) => <Image src={item} key={index} />)}
|
|
|
- </Image.PreviewGroup>
|
|
|
- </div> */}
|
|
|
</>
|
|
|
break
|
|
|
case 'TOP_VIDEO':
|
|
|
topName = "顶部视频"
|
|
|
El = <div className={style.pageVideo}>
|
|
|
- <span className={style.pagePreview} onClick={(e) => { e.stopPropagation(); setPage && setPage(1, item.id) }}><EyeOutlined /> 预览</span>
|
|
|
- <video src={topPageElements?.topVideoSpec?.videoUrl} style={{ width: 130, height: 100 }} controls />
|
|
|
+ <div className={style.pagePreview} onClick={(e) => { e.stopPropagation(); setPage && setPage(1, item.id) }}><EyeOutlined /> 预览</div>
|
|
|
+ <video src={topPageElements?.topVideoSpec?.videoUrl} style={{ width: 130, height: 100 }} />
|
|
|
</div>
|
|
|
break
|
|
|
}
|
|
@@ -352,24 +367,22 @@ function FlieBox(props: Props) {
|
|
|
{imgVisrible && <ImgModal isAll={isAll} />}
|
|
|
{imgsVisrible && <ImgsModal isAll={isAll} />}
|
|
|
</div>
|
|
|
- {
|
|
|
- listData?.records?.length > 0 && <div className={style.pagination}>
|
|
|
- {/* 分页 */}
|
|
|
- <Pagination
|
|
|
- showSizeChanger
|
|
|
- onChange={(page: number, pageSize?: number) => {
|
|
|
- getList({ pageSize, pageNum: page })
|
|
|
- }}
|
|
|
- onShowSizeChange={(current: number, size: number) => {
|
|
|
- getList({ pageSize: size, pageNum: current })
|
|
|
- }}
|
|
|
- pageSizeOptions={['10', '20', '30', '50', '100']}
|
|
|
- current={listData?.current}
|
|
|
- defaultPageSize={30}
|
|
|
- total={listData?.total}
|
|
|
- />
|
|
|
- </div>
|
|
|
- }
|
|
|
+ <div className={style.pagination}>
|
|
|
+ {/* 分页 */}
|
|
|
+ {listData?.records?.length > 0 && <Pagination
|
|
|
+ showSizeChanger
|
|
|
+ onChange={(page: number, pageSize?: number) => {
|
|
|
+ getList({ pageSize, pageNum: page })
|
|
|
+ }}
|
|
|
+ onShowSizeChange={(current: number, size: number) => {
|
|
|
+ getList({ pageSize: size, pageNum: current })
|
|
|
+ }}
|
|
|
+ pageSizeOptions={['10', '20', '30', '50', '100']}
|
|
|
+ current={listData?.current}
|
|
|
+ defaultPageSize={30}
|
|
|
+ total={listData?.total}
|
|
|
+ />}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
}
|