dropzone and update comming soon

pull/1/head
Saeid 5 years ago
parent b6240cd008
commit 73dda8df56

@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "es6",
"target": "es2017",
"allowSyntheticDefaultImports": true,
"baseUrl": "./",
"paths": {
"@JS/*": ["./resources/js/*"],
"@Global/*": ["./resources/js/Global/*"],
"@Home/*": ["./resources/js/Home/*"],
"@CRM/*": ["./modules/wm-crm/resources/js/*"],
"@Common/*": ["./modules/wm-common/resources/js/*"],
"@Core/*": ["./modules/wm-core/resources/js/*"],
"@User/*": ["./modules/wm-core/resources/js/Modules/User/*"],
"@Auth/*": ["./modules/wm-core/resources/js/Modules/Authentication/*"]
}
},
"exclude": ["node_modules"]
}

13
package-lock.json generated

@ -3965,6 +3965,11 @@
"integrity": "sha1-3vHxyl1gWdJKdm5YeULCEQbOEnU=", "integrity": "sha1-3vHxyl1gWdJKdm5YeULCEQbOEnU=",
"dev": true "dev": true
}, },
"dropzone": {
"version": "5.5.1",
"resolved": "https://registry.npmjs.org/dropzone/-/dropzone-5.5.1.tgz",
"integrity": "sha512-3VduRWLxx9hbVr42QieQN25mx/I61/mRdUSuxAmDGdDqZIN8qtP7tcKMa3KfpJjuGjOJGYYUzzeq6eGDnkzesA=="
},
"duplexer3": { "duplexer3": {
"version": "0.1.4", "version": "0.1.4",
"resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz",
@ -11602,6 +11607,14 @@
"vue-template-compiler": "^2.5.13" "vue-template-compiler": "^2.5.13"
} }
}, },
"vue2-dropzone": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/vue2-dropzone/-/vue2-dropzone-3.6.0.tgz",
"integrity": "sha512-YXC1nCWIZvfa98e/i6h+EshZCkFSxFEh0Sxr9ODfThAPPDVhAzLLlz/4XIx0NGO1QeSy6htwSstte47R7vVhLQ==",
"requires": {
"dropzone": "^5.5.1"
}
},
"vuetify": { "vuetify": {
"version": "2.1.1", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/vuetify/-/vuetify-2.1.1.tgz", "resolved": "https://registry.npmjs.org/vuetify/-/vuetify-2.1.1.tgz",

@ -41,6 +41,7 @@
"vue-scroll-reveal": "^1.0.11", "vue-scroll-reveal": "^1.0.11",
"vue-the-mask": "^0.11.1", "vue-the-mask": "^0.11.1",
"vue-tinymce-editor": "^1.6.2", "vue-tinymce-editor": "^1.6.2",
"vue2-dropzone": "^3.6.0",
"vuetify": "^2.0.19" "vuetify": "^2.0.19"
}, },
"devDependencies": { "devDependencies": {

@ -1,6 +1,6 @@
{ {
"/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=979ca3cbe3ae6f2f6648", "/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=b727d2fdd4ae9b2599ca",
"/js/vue/Home/app.js": "/js/vue/Home/app.js?id=952eba47f3c87b27c8e4", "/js/vue/Home/app.js": "/js/vue/Home/app.js?id=73deaff9655f8ee55fcb",
"/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=2438d0b19611c164de10", "/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=d94428e8a2e4f40c46c8",
"/js/vue/User/app.js": "/js/vue/User/app.js?id=90b3808d13f34c14baac" "/js/vue/User/app.js": "/js/vue/User/app.js?id=2b834de4476db0e81b1b"
} }

@ -0,0 +1,54 @@
<template>
<div>
<vue-dropzone ref="myVueDropzone" id="dropzone" @vdropzone-removed-file="removeFile" :options="dropzoneOptions" @vdropzone-success="responseSuccess"></vue-dropzone>
</div>
</template>
<script>
import Permissions from "@Global/utils/Permissions/list";
import vue2Dropzone from 'vue2-dropzone'
import 'vue2-dropzone/dist/vue2Dropzone.min.css'
export default {
props: {
api: { default: null },
defaultMessage: { default: "<i class='fa fa-cloud-upload'></i>آپلود فایل" },
value: { default:() => ([]) },
id: { default: null },
loadeFiles: {default:() => ([])},
},
components: {
vueDropzone: vue2Dropzone
},
data() {
return {
dropzoneOptions: {
url: this.api ? this.api : "https://httpbin.org/post",
thumbnailWidth: 200,
addRemoveLinks: true,
dictDefaultMessage: this.defaultMessage
},
};
},
methods: {
responseSuccess(file, response) {
// this.value.push(response.data);
// this.$emit('input', this.value);
},
removeFile(file, error, xhr) {
// let index = this.value.findIndex(x => x == xhr.data);
// this.value.splice(index, 1);
// this.$emit('input', this.value);
},
manuallyLoadFiles(files) { //file =[ {size: 123, name: "Icon", type: "image/png", url: "https://myvizo.com/img/logo_sm.png"}]
for (const file of files) {
this.$refs.myVueDropzone.manuallyAddFile(file, file.url);
}
}
},
watch: {
loadFiles(files) {
this.manuallyLoadFiles(files);
}
},
};
</script>

@ -3,14 +3,11 @@ var CommingSoonArray = [
"discount", "discount",
"transaction", "transaction",
"email", "email",
// "sms",
"prescription", "prescription",
"user_sms", "user_sms",
"crm-setting", "crm-setting",
// "crm-client-filter",
"crm-statistics", "crm-statistics",
// "user-list-filter",
]; ];
const commingSoon = { const commingSoon = {
methods: { methods: {

Loading…
Cancel
Save