import React, { useMemo } from 'react';
import Icon from '../../Icon/index';
import '../g.scss';
function EventList(props: IEventLists) {
const { list, change } = props;
return (
{list?.map((item, index) => {
return (
{
change?.( 'eventClick',item?.key,index);
}}
>
事件{index + 1}:
{item?.title}
{
e.stopPropagation();
change?.(index, 'eventDel');
}}
>
);
})}
);
}
export default EventList;
export interface IEventLists {
list: IEventList[];
change?: Function;
}
export interface IEventList {
title: string | number;
type: string;
key: string;
}