최동원

change

...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
27 $router.push({ 27 $router.push({
28 name: 'Folder', 28 name: 'Folder',
29 params: { id: item.folder_id }, 29 params: { id: item.folder_id },
30 - props: { folderId: item.id },
31 }) 30 })
32 " 31 "
33 > 32 >
...@@ -343,7 +342,14 @@ export default { ...@@ -343,7 +342,14 @@ export default {
343 }, 342 },
344 }; 343 };
345 }, 344 },
346 - async created() { 345 + created() {
346 + this.fetchData();
347 + },
348 + watch: {
349 + $route: 'fetchData',
350 + },
351 + methods: {
352 + async fetchData() {
347 try { 353 try {
348 const curData = { 354 const curData = {
349 id: this.$store.state.id, 355 id: this.$store.state.id,
...@@ -364,7 +370,6 @@ export default { ...@@ -364,7 +370,6 @@ export default {
364 console.log(error); 370 console.log(error);
365 } 371 }
366 }, 372 },
367 - methods: {
368 handleFileUpload() { 373 handleFileUpload() {
369 this.uploadedfile = this.$refs.uploadedfile.files[0]; 374 this.uploadedfile = this.$refs.uploadedfile.files[0];
370 console.log(this.uploadedfile); 375 console.log(this.uploadedfile);
......
...@@ -14,9 +14,7 @@ ...@@ -14,9 +14,7 @@
14 <v-list two-line subheader> 14 <v-list two-line subheader>
15 <!-- <v-subheader inset>Folders</v-subheader> --> 15 <!-- <v-subheader inset>Folders</v-subheader> -->
16 <!-- Folder view --> 16 <!-- Folder view -->
17 - <v-list-item v-if="this.$store.state.cur !== '/'" @click="moveParent" 17 + <v-list-item @click="$router.go(-1)">...</v-list-item>
18 - >...</v-list-item
19 - >
20 <v-list-item 18 <v-list-item
21 v-for="item in this.$store.getters.folderL" 19 v-for="item in this.$store.getters.folderL"
22 :key="item.folder_id" 20 :key="item.folder_id"
...@@ -27,7 +25,6 @@ ...@@ -27,7 +25,6 @@
27 $router.push({ 25 $router.push({
28 name: 'Folder', 26 name: 'Folder',
29 params: { id: item.folder_id }, 27 params: { id: item.folder_id },
30 - props: { folderId: item.folder_name },
31 }) 28 })
32 " 29 "
33 > 30 >
...@@ -312,13 +309,14 @@ import { ...@@ -312,13 +309,14 @@ import {
312 modifyFile, 309 modifyFile,
313 } from '../api/index'; 310 } from '../api/index';
314 import Axios from 'axios'; 311 import Axios from 'axios';
312 +
315 export default { 313 export default {
316 props: { 314 props: {
317 folderId: Number, 315 folderId: Number,
318 }, 316 },
319 data() { 317 data() {
320 return { 318 return {
321 - folder_id: this.folderId, 319 + folder_id: this.$route.params.id,
322 uploadedfile: null, 320 uploadedfile: null,
323 foldername: '', 321 foldername: '',
324 curfName: {}, 322 curfName: {},
...@@ -347,7 +345,14 @@ export default { ...@@ -347,7 +345,14 @@ export default {
347 }, 345 },
348 }; 346 };
349 }, 347 },
350 - async created() { 348 + created() {
349 + this.fetchData();
350 + },
351 + watch: {
352 + $route: 'fetchData',
353 + },
354 + methods: {
355 + async fetchData() {
351 try { 356 try {
352 console.log(this.$route.params.id); 357 console.log(this.$route.params.id);
353 const curData = { 358 const curData = {
...@@ -369,7 +374,6 @@ export default { ...@@ -369,7 +374,6 @@ export default {
369 console.log(error); 374 console.log(error);
370 } 375 }
371 }, 376 },
372 - methods: {
373 handleFileUpload() { 377 handleFileUpload() {
374 this.uploadedfile = this.$refs.uploadedfile.files[0]; 378 this.uploadedfile = this.$refs.uploadedfile.files[0];
375 console.log(this.uploadedfile); 379 console.log(this.uploadedfile);
......