draggable development

This commit is contained in:
Burak Civan
2022-12-22 16:23:17 +03:00
parent ab88fe413c
commit 84eece8e06
4 changed files with 34 additions and 4 deletions

View File

@ -25,7 +25,6 @@ import AkauntingSwitch from './../components/AkauntingSwitch';
import AkauntingSlider from './../components/AkauntingSlider';
import AkauntingColor from './../components/AkauntingColor';
import CardForm from './../components/CreditCard/CardForm';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
import NProgressAxios from './../plugins/nprogress-axios';

View File

@ -14,6 +14,7 @@ import Global from './../../mixins/global';
import Form from './../../plugins/form';
import BulkAction from './../../plugins/bulk-action';
import draggable from 'vuedraggable';
// plugin setup
Vue.use(DashboardPlugin);
@ -25,6 +26,10 @@ const app = new Vue({
Global
],
components: {
draggable
},
data: function () {
return {
form: new Form('document'),
@ -77,6 +82,7 @@ const app = new Vue({
],
email_template: false,
send_to: false,
drag: false
}
},
@ -111,6 +117,26 @@ const app = new Vue({
},
methods: {
checkMove(event) {
debugger;
},
onStart(event) {
debugger;
},
onEnd(event, index) {
this.drag = false;
let element = this.items[index];
this.items.splice(index, 1);
this.items.splice(event.newIndex, 0, element);
},
log(event) {
debugger;
},
onRefFocus(ref) {
let index = this.form.items.length - 1;