|
@@ -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}`);
|