点击文件名或者文件夹就能搜索
This commit is contained in:
20
web/index.js
20
web/index.js
@@ -58,6 +58,13 @@ const component_search_folders = {
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
`,
|
`,
|
||||||
|
mounted() {
|
||||||
|
if (this.$route.query.folder_id) {
|
||||||
|
this.folder.id = parseInt(this.$route.query.folder_id)
|
||||||
|
this.folder.foldername = this.$route.query.foldername
|
||||||
|
this.get_files_in_folder()
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
folder_last_page() {
|
folder_last_page() {
|
||||||
this.folder_offset = this.folder_offset - this.folder_limit
|
this.folder_offset = this.folder_offset - this.folder_limit
|
||||||
@@ -258,8 +265,8 @@ const component_file = {
|
|||||||
props: ['file'],
|
props: ['file'],
|
||||||
emits: ['play_audio'],
|
emits: ['play_audio'],
|
||||||
template: `
|
template: `
|
||||||
<td>{{ file.filename }}</td>
|
<td @click="dialog">{{ file.filename }}</td>
|
||||||
<td>{{ file.foldername }}</td>
|
<td @click="show_folder">{{ file.foldername }}</td>
|
||||||
<td>{{ computed_readable_size }}</td>
|
<td>{{ computed_readable_size }}</td>
|
||||||
<td>
|
<td>
|
||||||
<button @click="dialog">Dialog</button>
|
<button @click="dialog">Dialog</button>
|
||||||
@@ -279,6 +286,15 @@ const component_file = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
show_folder() {
|
||||||
|
this.$router.push({
|
||||||
|
path: '/search_folders',
|
||||||
|
query: {
|
||||||
|
folder_id: this.file.folder_id,
|
||||||
|
foldername: this.file.foldername,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
close_dialog() {
|
close_dialog() {
|
||||||
this.show_dialog = false
|
this.show_dialog = false
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user