Add deleteSection
This commit is contained in:
parent
4ddf76943d
commit
b26935fc07
|
@ -40,6 +40,7 @@
|
||||||
@addField="addField($event.detail[0])"
|
@addField="addField($event.detail[0])"
|
||||||
@editField="editField($event.detail[0], $event.detail[1])"
|
@editField="editField($event.detail[0], $event.detail[1])"
|
||||||
@deleteField="deleteField($event.detail[0], $event.detail[1])"
|
@deleteField="deleteField($event.detail[0], $event.detail[1])"
|
||||||
|
@deleteSection="deleteSection($event.detail[0])"
|
||||||
></event-form>
|
></event-form>
|
||||||
</ui-box>
|
</ui-box>
|
||||||
</form>
|
</form>
|
||||||
|
@ -134,6 +135,10 @@ function addField(sectionIndex) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function deleteSection(sindex) {
|
||||||
|
inner.value.config.sections.splice(sindex, 1);
|
||||||
|
}
|
||||||
|
|
||||||
function setFieldType(field) {
|
function setFieldType(field) {
|
||||||
singleField.value.model = JSON.parse(JSON.stringify(field.default));
|
singleField.value.model = JSON.parse(JSON.stringify(field.default));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue