mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-23 01:32:15 +00:00
v1.5-alpha.1
This commit is contained in:
10
resources/js/helpers.js
vendored
10
resources/js/helpers.js
vendored
@@ -2,6 +2,7 @@ import store from './store/index'
|
||||
import {debounce, includes} from "lodash";
|
||||
import {events} from './bus'
|
||||
import axios from 'axios'
|
||||
import router from '@/router'
|
||||
|
||||
const Helpers = {
|
||||
install(Vue) {
|
||||
@@ -88,6 +89,10 @@ const Helpers = {
|
||||
// Append form data
|
||||
formData.append('parent_id', rootFolder)
|
||||
|
||||
console.log(i);
|
||||
console.log(files[i]);
|
||||
console.log(formData);
|
||||
|
||||
// Upload data
|
||||
await store.dispatch('uploadFiles', formData)
|
||||
.then(() => {
|
||||
@@ -233,6 +238,11 @@ const Helpers = {
|
||||
events.$emit('popup:close')
|
||||
}
|
||||
|
||||
Vue.prototype.$isThisRoute = function(route, locations) {
|
||||
|
||||
return includes(locations, route.name)
|
||||
}
|
||||
|
||||
Vue.prototype.$isThisLocation = function(location) {
|
||||
|
||||
// Get current location
|
||||
|
||||
Reference in New Issue
Block a user