
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
vuedragablefor
Advanced tools
Vue directive for lists allowing drag-and-drop sorting in sync with View-Model. Based on Sortable.js
##Motivation
Create a directive that displays a dragable list and keeps in sync the view and underlying view model.
##Demo
Simple:
https://jsfiddle.net/dede89/j62g58z7/
Two Lists:
https://jsfiddle.net/dede89/hqxranrd/
Example with list clone:
https://jsfiddle.net/dede89/u5ecgtsj/
##Features
##Usage
Use it exactly as v-for directive, passing optional parameters using 'options' parameter. Option parameter can be json string or a full javascript object.
<div v-dragable-for="element in list1" options='{"group":"people"}'>
<p>{{element.name}}</p>
</div>
##Limitation
onStart
, onUpdate
, onAdd
, onRemove
Sortable.js options hooks are used by v-dragable-for to update VM. As such these four options are not usable with v-dragable-for. If you need to listen to re-order events, you can watch the underlying view model collection. For example: watch: {
'list1': function () {
console.log('Collection updated!');
},
npm install vuedragablefor
Bower install vue.dragable.for
// ES6
import Vue from 'vue'
import VueDragableFor from 'vuedragablefor'
Vue.use(VueDragableFor)
// ES5
var Vue = require('vue')
Vue.use(require('vuedragablefor'))
<script>
IncludeJust include vue.dragable.for.js
after Vue and lodash(version >=3).
FAQs
vue dragable for directive
We found that vuedragablefor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.