import *as React from 'react';
import { DragactLayoutItem, GridItemProvided } from '../../src/lib/dragact-type'
import { HistoryDragact } from './HistoryLayout'
import { Words } from './largedata';
import './index.css';
const fakeData = () => {
var Y = 0;
return Words.map((item, index) => {
if (index % 4 === 0) Y++;
return { ...item, GridX: index % 4 * 4, GridY: Y * 4, w: 4, h: 3, key: index + '' }
})
}
export const Card: (any: any) => any = ({ item, provided }) => {
return (
)
}
export class HistoryDemo extends React.Component<{}, {}> {
drag: HistoryDragact | null
render() {
const margin: [number, number] = [5, 5];
const dragactInit = {
width: 600,
col: 16,
rowHeight: 40,
margin: margin,
className: 'normal-layout',
layout: fakeData()
}
return (
复原操作demo
this.drag = n}
style={{
background: '#003A8C'
}}
>
{(item: DragactLayoutItem, provided: GridItemProvided) => {
return
}}
)
}
}