소스 검색

fe-11 看板组件

master
Chunxian Zhang 2 년 전
부모
커밋
9581e2332c
2개의 변경된 파일55개의 추가작업 그리고 0개의 파일을 삭제
  1. +24
    -0
      lazy-timer-fe/src/pages/Charts/Kanban.jsx
  2. +31
    -0
      lazy-timer-fe/src/pages/Charts/Orders.jsx

+ 24
- 0
lazy-timer-fe/src/pages/Charts/Kanban.jsx 파일 보기

@ -0,0 +1,24 @@
import React from 'react';
import { KanbanComponent, ColumnsDirective, ColumnDirective } from '@syncfusion/ej2-react-kanban';
import { kanbanData, kanbanGrid } from '../data/dummy';
import { Header } from '../components';
const Kanban = () => (
<div className="m-2 md:m-10 mt-24 p-2 md:p-10 bg-white rounded-3xl">
<Header category="App" title="Kanban" />
<KanbanComponent
id="kanban"
keyField="Status"
dataSource={kanbanData}
cardSettings={{ contentField: 'Summary', headerField: 'Id' }}
>
<ColumnsDirective>
{/* eslint-disable-next-line react/jsx-props-no-spreading */}
{kanbanGrid.map((item, index) => <ColumnDirective key={index} {...item} />)}
</ColumnsDirective>
</KanbanComponent>
</div>
);
export default Kanban;

+ 31
- 0
lazy-timer-fe/src/pages/Charts/Orders.jsx 파일 보기

@ -0,0 +1,31 @@
import React from 'react';
import { GridComponent, ColumnsDirective, ColumnDirective, Resize, Sort, ContextMenu, Filter, Page, ExcelExport, PdfExport, Edit, Inject } from '@syncfusion/ej2-react-grids';
import { ordersData, contextMenuItems, ordersGrid } from '../data/dummy';
import { Header } from '../components';
const Orders = () => {
const editing = { allowDeleting: true, allowEditing: true };
return (
<div className="m-2 md:m-10 mt-24 p-2 md:p-10 bg-white rounded-3xl">
<Header category="Page" title="Orders" />
<GridComponent
id="gridcomp"
dataSource={ordersData}
allowPaging
allowSorting
allowExcelExport
allowPdfExport
contextMenuItems={contextMenuItems}
editSettings={editing}
>
<ColumnsDirective>
{/* eslint-disable-next-line react/jsx-props-no-spreading */}
{ordersGrid.map((item, index) => <ColumnDirective key={index} {...item} />)}
</ColumnsDirective>
<Inject services={[Resize, Sort, ContextMenu, Filter, Page, ExcelExport, Edit, PdfExport]} />
</GridComponent>
</div>
);
};
export default Orders;

불러오는 중...
취소
저장