Commit 100f3021 authored by TTS Kieu Tuan Anh's avatar TTS Kieu Tuan Anh

onchangefile

parent d318b797
......@@ -78,6 +78,7 @@
small-chips
dense
accept="image/*"
@change="fileSelected"
/>
</v-col>
</v-row>
......@@ -410,6 +411,7 @@ export default {
middleware: ['web'],
data: () => {
return {
file: null,
dialog1: false,
dialog2: false,
title: '',
......@@ -417,7 +419,7 @@ export default {
content: '',
user_id: '',
status: null,
images: null,
images: [],
dialog: false,
dialogDelete: false,
headers: [
......@@ -716,6 +718,10 @@ export default {
duration: 3000
})
})
},
fileSelected (event) {
console.log(event)
console.log(this.images)
}
}
}
......
export default function ({ $axios }, inject, redirect) {
$axios.onError(error => {
if(error.response.status === 500) {
$axios.onError((error) => {
if (error.response.status === 500) {
redirect('/500')
}
})
$axios.onError(error => {
$axios.onError((error) => {
const code = parseInt(error.response && error.response.status)
if (code === 400) {
redirect('/400')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment