vue-draggable-plus
vue-draggable-plus copied to clipboard
add onstart callback fetaure
In the onStart method, you may need to interrupt dragging or placing elements, or rendering and placing elements requires obtaining data from the terminal, so the following is added:
- Allow the clone method to be an asynchronous function
- Add the return type of clone method: Promise and false can be returned. When false is returned, it will not be updated.
Deploy Preview for vue-draggable-plus ready!
| Name | Link |
|---|---|
| Latest commit | a04e1d8f1d8eddb8d7987e0163ca1c67b836a711 |
| Latest deploy log | https://app.netlify.com/sites/vue-draggable-plus/deploys/677e2ee34afa570008b7c484 |
| Deploy Preview | https://deploy-preview-182--vue-draggable-plus.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
This asynchronous behavior may lead to the correct value not being obtained if the promise has not been resolved when the update is triggered.
This asynchronous behavior may lead to the correct value not being obtained if the promise has not been resolved when the update is triggered.
This asynchronous behavior may lead to the correct value not being obtained if the promise has not been resolved when the update is triggered.
Yes. I've updated this method to use Promise. resolve to ensure the return value is as expected
If it's asynchronous, then no other events should be triggered before the promise is resolved. If that's the case, it could cause the view to be blocked, which I personally think is not a reasonable requirement.
If it's asynchronous, then no other events should be triggered before the promise is resolved. If that's the case, it could cause the view to be blocked, which I personally think is not a reasonable requirement.
Yes. Asynchronous may cause render to be blocked(maybe blocked to be wanted really?). We can also render page by asynchronous data after the element is placed, but it will cause rendered twice. Is it bad? so I want to solve it on start.
In fact, delayed rendering after dragging (may need to be combined with remote data for page rendering, may require the user to input again for confirmation, etc.) is also a normal requirement. For example
- Drag and drop to render remote components
- Before placed, user needs to input some information.
- Remote data needs to be verified before be placed.