Showing
3 changed files
with
7 additions
and
3 deletions
... | @@ -349,9 +349,10 @@ export default { | ... | @@ -349,9 +349,10 @@ export default { |
349 | }, | 349 | }, |
350 | async created() { | 350 | async created() { |
351 | try { | 351 | try { |
352 | + console.log(this.$route.params.id); | ||
352 | const curData = { | 353 | const curData = { |
353 | id: this.$store.state.id, | 354 | id: this.$store.state.id, |
354 | - folder_id: this.folder_id, | 355 | + folder_id: this.$route.params.id, |
355 | }; | 356 | }; |
356 | console.log(curData); | 357 | console.log(curData); |
357 | const response = await folder(curData); | 358 | const response = await folder(curData); | ... | ... |
... | @@ -69,7 +69,7 @@ export default new VueRouter({ | ... | @@ -69,7 +69,7 @@ export default new VueRouter({ |
69 | { | 69 | { |
70 | path: '/file/:id', | 70 | path: '/file/:id', |
71 | name: 'Folder', | 71 | name: 'Folder', |
72 | - component: () => import('../views/FolderPage.vue'), | 72 | + component: () => import('../components/folderc'), |
73 | props: true, | 73 | props: true, |
74 | }, | 74 | }, |
75 | ], | 75 | ], | ... | ... |
1 | <template> | 1 | <template> |
2 | <div> | 2 | <div> |
3 | - <folderc></folderc> | 3 | + <folderc v-bind:folderId="folderId"></folderc> |
4 | </div> | 4 | </div> |
5 | </template> | 5 | </template> |
6 | 6 | ||
7 | <script> | 7 | <script> |
8 | import folderc from '../components/folderc'; | 8 | import folderc from '../components/folderc'; |
9 | export default { | 9 | export default { |
10 | + props: { | ||
11 | + folderId: Number, | ||
12 | + }, | ||
10 | components: { | 13 | components: { |
11 | folderc, | 14 | folderc, |
12 | }, | 15 | }, | ... | ... |
-
Please register or login to post a comment