Aui 自动字段删除按钮无法正常工作 。但是添加按钮按原样工作。
这是我使用的配置代码:
AUI().use('liferay-auto-fields',function(A) {
new Liferay.AutoFields({
contentBox: '#clientContact',
fieldIndexes: namespace + 'clientContactIndexs',
on: {
'init':function(event) {
console.log('init');
},
'clone': function(event) {
console.log('clone');
console.log(event);
},
'delete': function(event) {
console.log('delete');
console.log(event);
}
}
}).render();
});
HTML 代码:
<div id="clientContact">
<div class="lfr-form-row lfr-form-row-inline">
<div class="row-fields">
<aui:row>
<aui:column cssClass="col-xs-12 col-md-4">
<aui:input name="clientContactName1" id="clientContactName1" label="" placeholder="client.contact.name">
<aui:validator name="required"></aui:validator>
</aui:input>
</aui:column>
<aui:column cssClass="col-xs-12 col-md-4">
<aui:input name="clientContactMobile1" id="clientContactMobile1" label="" placeholder="mobile">
</aui:input>
</aui:column>
<aui:column cssClass="col-xs-12 col-md-4">
<aui:input name="clientContactEmail1" id="clientContactEmail1" label="" placeholder="email">
</aui:input>
</aui:column>
</aui:row>
</div>
</div>
</div>
有什么我想念的吗?谢谢,