export-table-pulgin-csharp 1.0.11 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.ts +3 -2
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -62,7 +62,8 @@ export function export_stuff(paras: HandleSheetParams): string | null {
|
|
|
62
62
|
return t;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
const genValue = (value: any,
|
|
65
|
+
const genValue = (value: any, f: Field): string => {
|
|
66
|
+
let t = f.type
|
|
66
67
|
if (t == "object") {
|
|
67
68
|
throw new Error("invalid type <object>")
|
|
68
69
|
} else if (t == "object[]") {
|
|
@@ -114,7 +115,7 @@ public class ${RowClass} {
|
|
|
114
115
|
public static List<${RowClass}> Configs = new List<${RowClass}>()
|
|
115
116
|
{
|
|
116
117
|
${foreach(datas, data =>
|
|
117
|
-
` new ${RowClass}(${st(() => fields.map((f, index) => genValue(data[index], f
|
|
118
|
+
` new ${RowClass}(${st(() => fields.map((f, index) => genValue(data[index], f)).join(", "))}),`
|
|
118
119
|
)}
|
|
119
120
|
};
|
|
120
121
|
|