import React, { Fragment, useEffect, useRef } from 'react';
import { WhiteSpace, WingBlank } from 'antd-mobile';

export default function MobileCard(props) {
  const { value = {}, onChange, json, otherProps = {} } = props;
  useEffect(() => {}, [value]);
  const dataSource = value?.dataSource || [
    {
      name: '罗成',
      type: '待知晓',
      time: '2022-04-14 16:31:05',
    },
  ];
  const { columns, primaryKey } = otherProps;
  console.log(columns);
  return (
    <>
      {dataSource.map((g, index) => {
       return (
        <div key={g[primaryKey]} style={{
          padding: '15px 0',
          backgroundColor: '#ebebef',
        }}>
          <WingBlank>
            {columns.map((c, cIndex) => {
              return <div key={c.key}>
                111222333444
              </div>;
            })}
          </WingBlank>
        </div>);
      })}
    </>
  );
}
