Uncaught TypeError: ss.getQuickTypeForKey is not a function at Object.autoFormGetInputValue

Uncaught TypeError: ss.getQuickTypeForKey is not a function at Object.autoFormGetInputValue

我需要你的帮助。我已将 Autoform 更新到 6.0 版,但我的表单无法正常工作,出现此错误:

Uncaught TypeError: ss.getQuickTypeForKey is not a function
at Object.autoFormGetInputValue [as getInputValue] (autoform-api.js:493)
at HTMLInputElement.<anonymous> (autoform-inputs.js:6)

我的模板。html 自动表单:这里我有一个简单的插入自动表单,用于插入图像参考和数据。

<template name="insertArtForm">
    {{#autoForm collection=artCollection doc=user id="insertArtForm" type="insert"}}
      <fieldset>
        {{> afQuickField name='createdBy' type='hidden' defaultValue=user._id}}
        {{> afQuickField name='createdOn' type='hidden' defaultValue=today}}
        <h4>Resolución</h4>
        <div class="container">
          {{> afQuickField formgroup-class="col-md-1" name='width' type='number'}}
          <p class='col-md-1'>x</p>
          {{> afQuickField formgroup-class="col-md-1" name='height' type='number'}}
        </div>
        {{> afQuickField name='name' type='text'}}
        {{> afQuickField name='description' type='textarea'}}
        {{> afQuickField name='prixQuote' type='text'}}
        {{> afQuickField name='artURL' type='text'}}
      </fieldset>
      <button type="submit" class="btn btn-default" id="js-insert-art-form">Guardar</button>
    {{/autoForm}}
</template>

我的 .js 事件:

Template.insertArtForm.events({
  "click #js-insert-art-form": function(e){
    console.log("entra en el evento");
    $(".js-save-label").css("visibility","visible");
    window.setTimeout(function() {
                $(".js-save-label").fadeTo(500, 0).slideUp(500, function(){
                    $(this).remove();
                });
            }, 3000);
  }
});

我的架构:

import { Mongo } from 'meteor/mongo';
import { Index, MinimongoEngine } from 'meteor/easy:search';
import SimpleSchema from 'simpl-schema';
SimpleSchema.extendOptions(['autoform']);
/*Create and export Arts Collection*/
export const Arts = new Mongo.Collection('arts');
/*Arts index for easy:search*/
export const ArtIndex = new Index({
  collection: Arts,
  fields: ['name'],
  engine: new MinimongoEngine(),
});

//Define Art schema
Arts.schema = new SimpleSchema({
  createdBy: { //Owner
        type: String,
        label: "Artista",
        regEx: SimpleSchema.RegEx.Id,
        optional: true
  }, createdOn: {
        type: Date,
        label: "Fecha",
        optional: true
  }, height: {
      type: String,
      label: "Alto",
      optional: true
  }, width: {
      type: String,
      label: "Ancho",
      optional: true
  }, name: {
      type: String,
      label: "Nombre de la obra",
      optional: true
  }, description: {
      type: String,
      label: "Descripción de la obra",
      optional: true
  }, prixQuote: {
      type: String,
      label: "PrixQuote",
      optional: true
  }, artURL: {
      type: String,
      label: "URL de la obra",
      optional: true
  }
});

/*Attach the Arts schema for automatic validations*/
Arts.attachSchema(Arts.schema);

我真的很绝望

我也有这个问题。请务必在您的 packages.json 中安装最新的节点 simpl-schema。我更新为 "simpl-schema": "0.2.3",错误消失了。