Browse Source

table-cel 样式应用bug

zhuth 6 years ago
parent
commit
6fd61127be

+ 4 - 2
kanban-client/app/component/converter.js

@@ -83,7 +83,7 @@ function tableConfig(model, theme) {
     if(title) {
         title.style = parseObjectStr(title.style || '{}');
     }
-    return {
+    let c = {
         type: 'table',
         config: {
             fontSize: fontSize || getFontSize(),
@@ -109,7 +109,9 @@ function tableConfig(model, theme) {
             rowsStyle: parseObjectStr(rowsstyle),
         },
         layout: getLayout(layout)
-    }
+    };
+    
+    return c;
 }
 
 function barConfig(model, theme) {

+ 5 - 4
kanban-client/app/src/Table/TableCell.jsx

@@ -74,12 +74,13 @@ export default class TableCell extends React.Component {
       <td
         className={className}
         onClick={this.handleClick}
-        style={rowStyle}
         {...tdProps}
       >
-        {indentText}
-        {expandIcon}
-        {text}
+        <div style={rowStyle}>
+          {indentText}
+          {expandIcon}
+          {text}
+        </div>
       </td>
     );
   }

+ 3 - 1
kanban-client/package.json

@@ -4,7 +4,8 @@
   "description": "boardshow",
   "main": "main.js",
   "scripts": {
-    "start": "webpack-dev-server --port 8100 --inline --content-base build/ --config webpack.dev.config"
+    "start": "webpack-dev-server --port 8100 --inline --content-base build/ --config webpack.dev.config",
+    "build": "webpack"
   },
   "keywords": [
     "board",
@@ -19,6 +20,7 @@
     "element-resize-event": "^2.0.9",
     "jquery": "^1.11.2",
     "lodash.get": "^4.4.2",
+    "promise-polyfill": "^7.1.2",
     "prop-types": "^15.5.8",
     "rc-animate": "^2.3.0",
     "rc-util": "4.x",