Drag Clone
Drag and drop from one list to another list, you can use the clone
attribute to enable it, internally use JSON.parse(JSON.stringify())
to achieve cloning by default, if you need to pass a custom function, please Use the clone
attribute to pass the function, and use the method to customize the clone.
When we use this function, we need to pay attention to:
- The
pull
attribute in thegroup
attribute of the cloned component must beclone
, otherwise it cannot be cloned. - The
name
attribute in thegroup
of the cloned component must be consistent with thename
attribute in thegroup
of the cloned component, otherwise it cannot be cloned.
TIP
Note: When we use the clone
attribute, we need to regenerate a unique key
, otherwise it will cause the component to render abnormally.