From 09e2aaa2e8e66704a40e941768d6b9f09201b724 Mon Sep 17 00:00:00 2001 From: Hongyuan Ma Date: Sat, 9 Jun 2018 13:18:14 +0800 Subject: [PATCH] Overwrite the table component --- front-end/src/page/status/index.jsx | 6 +- front-end/src/util/basic-table/index.jsx | 152 ++++++++++++----------- 2 files changed, 80 insertions(+), 78 deletions(-) diff --git a/front-end/src/page/status/index.jsx b/front-end/src/page/status/index.jsx index 4bb74a0..6067a78 100644 --- a/front-end/src/page/status/index.jsx +++ b/front-end/src/page/status/index.jsx @@ -124,7 +124,6 @@ class Status extends React.Component { - 1111 {/**/} {/*1-2*/} {/*1-3*/} @@ -165,8 +164,9 @@ class Status extends React.Component { {listBody} - {/**/} - + {/**/} + + {/**/} diff --git a/front-end/src/util/basic-table/index.jsx b/front-end/src/util/basic-table/index.jsx index ff68322..493528d 100644 --- a/front-end/src/util/basic-table/index.jsx +++ b/front-end/src/util/basic-table/index.jsx @@ -1,6 +1,5 @@ import React from 'react'; -import ReactTable from 'react-table' -import 'react-table/react-table.css' +import { Icon, Table, Menu, Message } from 'semantic-ui-react' import './index.css'; // general basic table @@ -14,81 +13,84 @@ class BasicTable extends React.Component { render() { - const data = [{ - name: 'Tanner Linsley', - age: 26, - friend: { - name: 'Jason Maurer', - age: 23, - } - },{ - name: 'Tanner Linsley', - age: 26, - friend: { - name: 'Jason Maurer', - age: 23, - } - },{ - name: 'Tanner Linsley', - age: 26, - friend: { - name: 'Jason Maurer', - age: 23, - } - },{ - name: 'Tanner Linsley', - age: 26, - friend: { - name: 'Jason Maurer', - age: 23, - } - },{ - name: 'Tanner Linsley', - age: 26, - friend: { - name: 'Jason Maurer', - age: 23, - } - },{ - name: 'Tanner Linsley', - age: 26, - friend: { - name: 'Jason Maurer', - age: 23, - } - },{ - name: 'Tanner Linsley', - age: 26, - friend: { - name: 'Jason Maurer', - age: 23, - } - },{ - name: 'Tanner Linsley', - age: 26, - friend: { - name: 'Jason Maurer', - age: 23, - } - }] + let list = this.props.list - const columns = [{ - Header: 'Name', - accessor: 'name' // String-based value accessors! - }, { - Header: 'Age', - accessor: 'age', - Cell: props => {props.value} // Custom cell components! - }, { - id: 'friendName', // Required because our accessor is not a string - Header: 'Friend Name', - accessor: d => d.friend.name // Custom value accessors! - }, { - Header: props => Friend Age, // Custom header components! - accessor: 'friend.age' - }] return ( - + + + + Alias + System + Branch + read only + read & write + Date + + + 1 client + 2 clients + 4 clients + + 1 client + 2 clients + 4 clients + + {/**/} + {/*1 clients*/} + {/*2 clients*/} + {/*4 clients*/} + {/**/} + + + + + {/*alias*/} + Cabbage + + {/*system*/} + Ubuntu 16 x86_64 + + {/*branch*/} + REL9_6_STABLE + + {/*rw-data*/} + + + + + + + {/*rw-data*/} + + + + + + + {/*date*/} + {new Date().toDateString()} + + + + + + + + + + 1 + 2 + 3 + 4 + + + + + + + + +
); } -- 2.39.5