Explorar o código

【看板客户端】【小改】

zhuth %!s(int64=8) %!d(string=hai) anos
pai
achega
9bb3c641ff

+ 2 - 2
kanban-client/app/component/Layout.js

@@ -44,14 +44,14 @@ class BasicLayout extends React.Component {
       let {type, config} = item;
       if(type == 'title') {
         return (<div key={i}><Title {...config}/></div>);
-      }else if(type == 'div') {
-        return (<div key={i}><span className="text">{i}</span></div>);
       }else if(type == 'form') {
         return (<div key={i}><Form {...config}/></div>);
       }else if(type == 'table') {
         return (<div key={i}><Table {...config} /></div>);
       }else if(type == 'charts') {
         return <div key={i}><Charts {...config}/></div>
+      }else{
+        return (<div key={i}><span className="text">{i}</span></div>);
       }
     });
   }

+ 4 - 3
kanban-client/app/component/factory.js

@@ -75,7 +75,8 @@ class Factory extends React.Component {
     }
 
     render() {
-        const {fixedbox} = this.state.model;
+        const {title, content, fixedbox} = this.state.model;
+        let titleConfig = title.config || {height: 0};
         let items = [];
         if(fixedbox) {
            items  = fixedbox.items || [];
@@ -83,9 +84,9 @@ class Factory extends React.Component {
         return (
             <div>
                 <Title {...this.state.model.title.config} />
-                <Container items={this.state.model.content.items} rowHeight={(window.innerHeight - this.state.model.title.config.height || 55) / 10} />
+                <Container items={content.items} rowHeight={(window.innerHeight - titleConfig.height || 55) / 10} />
                 {items.map((item, index) => {
-                    return <FixedBox key={`${index}`} titleHeight={this.state.model.title.config.height} {...item}/>;
+                    return <FixedBox key={`${index}`} titleHeight={titleConfig.height} {...item}/>;
                 })}
             </div>
         );

+ 4 - 0
kanban-client/assets/Form/index.css

@@ -21,6 +21,10 @@ body,
 .rc-form {
   height: 100%;
 }
+.rc-form-header {
+  font-size: large;
+  font-weight: bold;
+}
 .rc-form-container {
   width: 100%;
   height: 100%;

+ 2 - 0
kanban-client/assets/Table/index.css

@@ -1,4 +1,6 @@
 .rc-table {
+  height: 100%;
+  background-color: #333333;
   color: white;
 }
 .rc-table-main {

+ 1 - 0
kanban-client/assets/Table/index.less

@@ -2,6 +2,7 @@
 
 .@{prefixCls} {
     height: 100%;
+    background-color: #333333;
     color: white;
 }