lanyunfei 7 kuukautta sitten
vanhempi
commit
c7a451ce3b
2 muutettua tiedostoa jossa 10 lisäystä ja 2 poistoa
  1. 5 1
      dist/FileUtil.js
  2. 5 1
      src/FileUtil.ts

+ 5 - 1
dist/FileUtil.js

@@ -130,7 +130,11 @@ var FileUtil = /** @class */ (function () {
         var jsobj = outPutData.jsobj;
         text += "export interface I".concat(outPutData.sheetname, " {");
         outPutData.headInfo.keys.forEach(function (key, index) {
-            text += "\r\n\t".concat(key.name, ":").concat(key.type).concat(index < outPutData.headInfo.keys.length - 1 ? ',' : '', " //").concat(key.des);
+            var arrStr = '';
+            for (var i = 1; i < key.arrayNum; i++) {
+                arrStr += '[]';
+            }
+            text += "\r\n\t".concat(key.name, ":").concat(key.type).concat(arrStr).concat(index < outPutData.headInfo.keys.length - 1 ? ',' : '', " //").concat(key.des);
         });
         text += '\r\n}\r\n';
         text += "export let ".concat(outPutData.sheetname, ": { [key: string]: I").concat(outPutData.sheetname, " }=\r\n{");

+ 5 - 1
src/FileUtil.ts

@@ -126,7 +126,11 @@ export default class FileUtil {
         let jsobj = outPutData.jsobj
         text += `export interface I${outPutData.sheetname} {`
         outPutData.headInfo.keys.forEach((key, index) => {
-            text += `\r\n\t${key.name}:${key.type}${index < outPutData.headInfo.keys.length - 1 ? ',' : ''} //${key.des}`
+            let arrStr = ''
+            for (let i = 1; i < key.arrayNum; i++) {
+                arrStr += '[]'
+            }
+            text += `\r\n\t${key.name}:${key.type}${arrStr}${index < outPutData.headInfo.keys.length - 1 ? ',' : ''} //${key.des}`
         })
         text += '\r\n}\r\n'
         text += `export let ${outPutData.sheetname}: { [key: string]: I${outPutData.sheetname} }=\r\n{`