|
|
|
@ -1,8 +1,10 @@
|
|
|
|
import React from 'react';
|
|
|
|
import React, { useEffect } from 'react';
|
|
|
|
import styles from './style/cardWrap.module.less';
|
|
|
|
import styles from './style/cardWrap.module.less';
|
|
|
|
import { getImageUrl } from '@/utils/pubUse';
|
|
|
|
import { getImageUrl } from '@/utils/pubUse';
|
|
|
|
import { Image, Popconfirm } from '@arco-design/web-react';
|
|
|
|
import { Image, Popconfirm } from '@arco-design/web-react';
|
|
|
|
import { IconEdit, IconDelete } from '@arco-design/web-react/icon';
|
|
|
|
import { IconEdit, IconDelete } from '@arco-design/web-react/icon';
|
|
|
|
|
|
|
|
import { GlobalState } from '@/store';
|
|
|
|
|
|
|
|
import { useSelector, useDispatch } from 'react-redux';
|
|
|
|
|
|
|
|
|
|
|
|
interface CardWrapProps {
|
|
|
|
interface CardWrapProps {
|
|
|
|
item: any;
|
|
|
|
item: any;
|
|
|
|
@ -12,6 +14,7 @@ interface CardWrapProps {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const CardWrap: React.FC<CardWrapProps> = ({ item, onEdit, onDelete, onClick }) => {
|
|
|
|
const CardWrap: React.FC<CardWrapProps> = ({ item, onEdit, onDelete, onClick }) => {
|
|
|
|
|
|
|
|
const { userInfo, userLoading } = useSelector((state: GlobalState) => state);
|
|
|
|
const handleEdit = (e: React.MouseEvent) => {
|
|
|
|
const handleEdit = (e: React.MouseEvent) => {
|
|
|
|
e.stopPropagation();
|
|
|
|
e.stopPropagation();
|
|
|
|
if (onEdit) {
|
|
|
|
if (onEdit) {
|
|
|
|
@ -51,9 +54,12 @@ const CardWrap: React.FC<CardWrapProps> = ({ item, onEdit, onDelete, onClick })
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className={styles['card-footer']}>
|
|
|
|
<div className={styles['card-footer']}>
|
|
|
|
<div className={styles['owner']}>
|
|
|
|
<div className={styles['owner']}>
|
|
|
|
{/*<Image*/}
|
|
|
|
<Image
|
|
|
|
{/*/>*/}
|
|
|
|
className={styles['avatar']}
|
|
|
|
<span>头像 </span>
|
|
|
|
width={25}
|
|
|
|
|
|
|
|
preview={false}
|
|
|
|
|
|
|
|
src={userInfo.avatar}
|
|
|
|
|
|
|
|
/>
|
|
|
|
<span>{item.createUser}</span>
|
|
|
|
<span>{item.createUser}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className={styles['operation']}>
|
|
|
|
<div className={styles['operation']}>
|
|
|
|
|