diff --git a/src/components/preview/FileDetails.vue b/src/components/preview/FileDetails.vue index 17a1cdd..e461412 100644 --- a/src/components/preview/FileDetails.vue +++ b/src/components/preview/FileDetails.vue @@ -17,7 +17,19 @@ - + +

+ + 是否开始扫描? +

+
+ 取消 + 确定 +
+ +
正在同步文件基本信息: {{ syncPercent }}% 正在为文件内容创建索引: {{ indexingPercent }}%
@@ -162,20 +174,18 @@ export default { } this.syncLoading = !((this.syncPercent === 100 && this.indexingPercent === 100) || (this.syncPercent === 0 && this.indexingPercent === 0)); }, + cancelScan() { + document.getElementById('scanDirectoryBtn-file').click() + }, scanDirectory(file) { - this.$confirm('是否开始扫描? ', '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - }).then(() => { - this.syncLoading = true - this.syncPercent = 0 - this.clickSync = true - settingApi.syncUser({username: this.$store.state.user.name, path: decodeURIComponent(file.path + file.name)}).then(() => { - this.clickSync = false - }).catch(() => { - this.clickSync = false - }) + this.cancelScan() + this.syncLoading = true + this.syncPercent = 0 + this.clickSync = true + settingApi.syncUser({username: this.$store.state.user.name, path: decodeURIComponent(file.path + file.name)}).then(() => { + this.clickSync = false + }).catch(() => { + this.clickSync = false }) }, } @@ -216,6 +226,9 @@ export default { } >>> .details-scan { + .el-form-item__label { + line-height: 32.5px; + } margin-bottom: 10px; .el-button--mini, .el-button--mini.is-round { padding: 5px 15px;