-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Description
Hello,
in order to duplicate an object with all its children, I had to use a jQuery function, please is there a better way in Vue? I am using Vue 0.12.1
duplicateThis: function (field) {
var currentField = this.fields[field.index];
var insertField = {
name: currentField.name,
type: currentField.type,
description: currentField.description,
options: $.extend(true, {}, currentField.options),
required: currentField.required
};
this.fields.splice(field.index + 1, 0, insertField);
}
Thank you
Metadata
Metadata
Assignees
Labels
No labels