|
@ -2,17 +2,17 @@ |
|
|
<div class="bucket-filemanager"> |
|
|
<div class="bucket-filemanager"> |
|
|
<div class="file-table"> |
|
|
<div class="file-table"> |
|
|
<urban-filemanager-parent></urban-filemanager-parent> |
|
|
<urban-filemanager-parent></urban-filemanager-parent> |
|
|
<template each={ file in props.files }> |
|
|
|
|
|
|
|
|
<template each={ file in state.files }> |
|
|
<urban-filemanager-file |
|
|
<urban-filemanager-file |
|
|
if={ file.is_file } |
|
|
if={ file.is_file } |
|
|
file={ file } |
|
|
file={ file } |
|
|
handleClick={ handleDirectoryClick } |
|
|
|
|
|
|
|
|
handleClick={ handleFileClick } |
|
|
handleMarked={ handleMarked } |
|
|
handleMarked={ handleMarked } |
|
|
></urban-filemanager-file> |
|
|
></urban-filemanager-file> |
|
|
<urban-filemanager-directory |
|
|
<urban-filemanager-directory |
|
|
if={ !file.is_file } |
|
|
if={ !file.is_file } |
|
|
file={ file } |
|
|
file={ file } |
|
|
handleClick={ handleFileClick } |
|
|
|
|
|
|
|
|
handleClick={ handleDirectoryClick } |
|
|
handleMarked={ handleMarked } |
|
|
handleMarked={ handleMarked } |
|
|
></urban-filemanager-directory> |
|
|
></urban-filemanager-directory> |
|
|
</template> |
|
|
</template> |
|
@ -32,6 +32,19 @@ |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
|
|
|
|
|
|
|
|
|
state: { |
|
|
|
|
|
files: [ |
|
|
|
|
|
|
|
|
|
|
|
], |
|
|
|
|
|
path: [ |
|
|
|
|
|
|
|
|
|
|
|
] |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
onBeforeMount(props, state) { |
|
|
|
|
|
state.files = props.files |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
handleFileClick() { |
|
|
handleFileClick() { |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
@ -42,12 +55,16 @@ |
|
|
* |
|
|
* |
|
|
*/ |
|
|
*/ |
|
|
handleDirectoryClick(event, file) { |
|
|
handleDirectoryClick(event, file) { |
|
|
axios.get('/api/', { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.state.path.push(file) |
|
|
|
|
|
|
|
|
|
|
|
axios.get('/api/file/' + this.props.id, { |
|
|
params: { |
|
|
params: { |
|
|
filename: file.filename |
|
|
|
|
|
|
|
|
path: this.state.path.join('/') |
|
|
} |
|
|
} |
|
|
}).then((response) => { |
|
|
}).then((response) => { |
|
|
|
|
|
|
|
|
|
|
|
this.state.files = response.data.files |
|
|
|
|
|
this.update() |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|