In doing bomb box section, to use a drag effect plug-ins to search for a long time, but the feeling is not very consistent that I need, so put before the write js drag took over, put in vue . What happens when a specific operation that it? Let's look together at:
1. First create a new drag.js in assets / js Lane
2. drag js copy to the inside, and export default out.
Drag default function Export (ID) {
// Code content
}
. 1
2
. 3
3. In this introduction to the main.js js, and tied on the prototype vue:
import { drag } from ‘./assets/js/drag.js’
Vue.prototype. Drag () on it.
Author: learning_H
Source: CSDN
Original: https://blog.csdn.net/qq_42345237/article/details/89603714
Copyright: This article is a blogger original article, reproduced, please attach Bowen link!