draggable development
This commit is contained in:
1
resources/assets/js/mixins/global.js
vendored
1
resources/assets/js/mixins/global.js
vendored
@ -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';
|
||||
|
26
resources/assets/js/views/common/documents.js
vendored
26
resources/assets/js/views/common/documents.js
vendored
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user