ドライブのファイルの削除を実装

This commit is contained in:
syuilo
2018-06-15 09:53:30 +09:00
parent ad8aa1c179
commit bd827f946a
8 changed files with 98 additions and 39 deletions

View File

@@ -100,6 +100,7 @@ export default Vue.extend({
this.connection.on('file_created', this.onStreamDriveFileCreated);
this.connection.on('file_updated', this.onStreamDriveFileUpdated);
this.connection.on('file_deleted', this.onStreamDriveFileDeleted);
this.connection.on('folder_created', this.onStreamDriveFolderCreated);
this.connection.on('folder_updated', this.onStreamDriveFolderUpdated);
@@ -118,6 +119,7 @@ export default Vue.extend({
beforeDestroy() {
this.connection.off('file_created', this.onStreamDriveFileCreated);
this.connection.off('file_updated', this.onStreamDriveFileUpdated);
this.connection.off('file_deleted', this.onStreamDriveFileDeleted);
this.connection.off('folder_created', this.onStreamDriveFolderCreated);
this.connection.off('folder_updated', this.onStreamDriveFolderUpdated);
(this as any).os.streams.driveStream.dispose(this.connectionId);
@@ -136,6 +138,10 @@ export default Vue.extend({
}
},
onStreamDriveFileDeleted(fileId) {
this.removeFile(fileId);
},
onStreamDriveFolderCreated(folder) {
this.addFolder(folder, true);
},