2017-03-05 20 views
0

私はあなたの助けが必要です。未知の型エラー:ss.getQuickTypeForKeyはObject.autoFormGetInputValueの関数ではありません

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のオートフォーム::私は、バージョン6.0にオートフォームを更新しましたし、私のフォームが動作しない、私はこのエラーを得た、ここで私は、画像の参照やデータを挿入するために、単純な挿入オートフォームを持っています。

<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); 

私は本当に必死です。

答えて

0

この問題もありました。 packages.jsonに最新のノードsimpl-schemaがインストールされていることを確認してください。私は"simpl-schema": "0.2.3"に遅れて、エラーは消え去った。

+0

ありがとうございました!それは私の問題を解決しました!驚くばかり – CapuzR

関連する問題