lrf 2 år sedan
förälder
incheckning
96d6e1a47f
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      app/public/ts-template.js

+ 2 - 2
app/public/ts-template.js

@@ -22,8 +22,8 @@ const ModelContext = (data) => {
   fc.push(`export class ${prefix} extends BaseModel {`);
   // 处理字段
   for (const col of columns) {
-    const { type, required, index, title, zh } = col;
-    const prop = { required, index, zh };
+    const { type, title } = col;
+    const prop = _.pick(col, ['required', 'index', 'zh', 'remark']);
     const modelType = getModelType(type);
     fc.push(`  @prop(${JSON.stringify(prop)})`);
     fc.push(`  ${title}: ${modelType}`);