瀏覽代碼

colSetting, cellType

MaiXinRong 7 年之前
父節點
當前提交
043473cba4
共有 2 個文件被更改,包括 9 次插入1 次删除
  1. 3 0
      package.json
  2. 6 1
      web/users/js/col_setting.js

+ 3 - 0
package.json

@@ -27,5 +27,8 @@
     "log4js": "~2.3.3",
     "pdfkit": "^0.8.2",
     "ueditor": "^1.2.3"
+  },
+  "scripts": {
+    "start": "C:\\Users\\mai\\AppData\\Roaming\\npm\\babel-node.cmd operation.js"
   }
 }

+ 6 - 1
web/users/js/col_setting.js

@@ -291,9 +291,14 @@ let ColSettingObj = {
             if (cell.text() !== '') {
                 col.data.getText = cell.text();
             }
-            setting.cols.push(col);
             // wordWrap
             col.data.wordWrap = sheet.getValue(setting.headRows + this.Rows.wordWrap, iCol) || false;
+            // cellType
+            cell = sheet.getCell(setting.headRows + this.Rows.cellType, iCol);
+            if (cell.text() !== '') {
+                col.data.cellType = cell.text();
+            }
+            setting.cols.push(col);
         }
         return setting;
     }