Meteor TypeError:无法读取属性';切片';空的
我在项目中使用autoform,打开表单时出现此错误 不确定这是否是因为任何版本或依赖关系,我的自动表单不工作,我收到了这个错误,我有屏幕截图和模式代码,下面的表单代码 模板Meteor TypeError:无法读取属性';切片';空的,meteor,meteor-autoform,meteoric,Meteor,Meteor Autoform,Meteoric,我在项目中使用autoform,打开表单时出现此错误 不确定这是否是因为任何版本或依赖关系,我的自动表单不工作,我收到了这个错误,我有屏幕截图和模式代码,下面的表单代码 模板 <template name="assesmentNew"> {{#ionModal customTemplate=true}} {{# autoForm collection="Assesments" id="assesments-new-form" type="insert"}}
<template name="assesmentNew">
{{#ionModal customTemplate=true}}
{{# autoForm collection="Assesments" id="assesments-new-form" type="insert"}}
<div class="bar bar-header bar-stable">
<button data-dismiss="modal" type="button" class="button button-clear">Cancel</button>
<h2 class="title">New Assesment</h2>
<button type="submit" class="button button-positive button-clear">Save</button>
</div>
<div class="content has-header overflow-scroll">
{{> afQuickField name="name" }}
{{> afQuickField name="email"}}
{{> afQuickField name="category"}}
{{> afQuickField name="location"}}
</div>
{{/autoForm}}
{{/ionModal}}
</template>
这是autoform的新修补程序与autoform的新版本之间的问题 显然,有些标签被跳过,有些则没有(请参阅)。为解决此问题并避免输入类型不存在时出现此错误(例如,
type=number
),所有由autoform呈现的架构字段必须定义标签类型选项:
...
autoform: {
'label-type': 'placeholder',
placeholder: 'Linha'
}
谢谢,它是有效的,@Rafael Quintanilha,但是由于某些原因,插入没有发生。如果我没有使用simpleschema,并且也有这个错误呢?我用的是流星,对不起,我是新来的,我们把这个物体放在哪里?
...
autoform: {
'label-type': 'placeholder',
placeholder: 'Linha'
}