import React, { useMemo } from 'react'; import Wrap from '../wrap/Wrap'; import Icon from '../../Icon/index'; import { returnClass } from '../unit'; import riseEffect from './riseEffect.svg'; import classic from './classic.svg'; import starrySky from './starrySky.svg'; import '../g.scss'; function ListBy2(props: IListBy2) { const { list, wrapStyle = { padding: '12px 5px' }, change } = props; const srcs = { riseEffect, classic, starrySky }; return (
{list?.map((item) => { return (
{ change?.({key:'changeSceneEffect', itemKey:item?.key, value:!item?.value })}} > {item?.value ? 使用中 : <>}

{item?.title}

); })}
); } export default ListBy2; export interface IListBy2 { list?: IList[]; key?: string; attrKey?: string; wrapStyle?: React.CSSProperties; change?: Function; } export interface IList { key?: string; value?: boolean; title?: string; }