lrf 2 anos atrás
pai
commit
ce1ebf36d5
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      app/public/table-template.js

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

@@ -15,13 +15,13 @@ module.exports = (data) => {
   let pluginArea = '';
   for (const p of pluginColumns) {
     const { title, type, required = false, remark, index, def, zh, ref, getProp } = p;
-    const params = _.omit(p, ['type', 'index', 'title']);
+    const params = _.pick(p, ['zh', 'required', 'def']);
     const r = columnType.find((cf) => cf.value === type);
     if (!r) continue;
     const { path } = r;
     if (path) {
       pluginHead += `const ${type}Plugin = require('${path}');\n`;
-      pluginArea += `schema.plugin(${type}Plugin(${params}));\n`;
+      pluginArea += `schema.plugin(${type}Plugin(${JSON.stringify(params)}));\n`;
     }
   }