Update FileManager.vue

This commit is contained in:
Baobhan Sith
2025-04-18 13:08:44 +08:00
parent d2e93b5051
commit 01b44c3562
@@ -763,6 +763,7 @@ const cancelSearch = () => {
/> />
</div> </div>
<!-- 按钮移到 path-bar 外面 --> <!-- 按钮移到 path-bar 外面 -->
<div class="path-actions"> <!-- 新增包裹容器 -->
<!-- 恢复使用 props.sftpManager.isLoading props.wsDeps.isConnected.value --> <!-- 恢复使用 props.sftpManager.isLoading props.wsDeps.isConnected.value -->
<button class="toolbar-button" @click.stop="loadDirectory(currentPath)" :disabled="isLoading || !props.wsDeps.isConnected.value || isEditingPath" :title="t('fileManager.actions.refresh')"><i class="fas fa-sync-alt"></i></button> <button class="toolbar-button" @click.stop="loadDirectory(currentPath)" :disabled="isLoading || !props.wsDeps.isConnected.value || isEditingPath" :title="t('fileManager.actions.refresh')"><i class="fas fa-sync-alt"></i></button>
<!-- 恢复使用 props.sftpManager.isLoading props.wsDeps.isConnected.value --> <!-- 恢复使用 props.sftpManager.isLoading props.wsDeps.isConnected.value -->
@@ -793,6 +794,7 @@ const cancelSearch = () => {
<!-- <button @click="searchQuery = ''; searchInputRef?.focus()" v-if="searchQuery" class="clear-search-button">&times;</button> --> <!-- <button @click="searchQuery = ''; searchInputRef?.focus()" v-if="searchQuery" class="clear-search-button">&times;</button> -->
</div> </div>
</div> </div>
</div> <!-- 结束包裹容器 -->
<div class="actions-bar"> <div class="actions-bar">
<input type="file" ref="fileInputRef" @change="handleFileSelected" multiple style="display: none;" /> <input type="file" ref="fileInputRef" @change="handleFileSelected" multiple style="display: none;" />
<!-- 恢复使用 props.sftpManager.isLoading props.wsDeps.isConnected.value --> <!-- 恢复使用 props.sftpManager.isLoading props.wsDeps.isConnected.value -->
@@ -961,7 +963,7 @@ const cancelSearch = () => {
border: 1px solid var(--border-color); /* 添加边框 */ border: 1px solid var(--border-color); /* 添加边框 */
border-radius: 4px; /* 圆角 */ border-radius: 4px; /* 圆角 */
padding: 0.2rem 0.4rem; /* 内边距 */ padding: 0.2rem 0.4rem; /* 内边距 */
flex-grow: 1; /* 占据可用空间 */ /* flex-grow: 1; /* 不再占据可用空间 */
overflow: hidden; /* 防止内部溢出 */ overflow: hidden; /* 防止内部溢出 */
min-width: 100px; /* 最小宽度 */ min-width: 100px; /* 最小宽度 */
} }
@@ -1024,6 +1026,14 @@ const cancelSearch = () => {
color: var(--button-hover-bg-color, var(--button-bg-color)); /* 悬停时使用按钮悬停色 */ color: var(--button-hover-bg-color, var(--button-bg-color)); /* 悬停时使用按钮悬停色 */
} }
/* 新增 path-actions 容器样式 */
.path-actions {
display: flex;
align-items: center;
/* gap: 0.1rem; */ /* 可以根据需要添加微小的间距,但之前已将按钮 margin 设为 0 */
flex-shrink: 0; /* 防止被压缩 */
}
/* Actions Bar美化 */ /* Actions Bar美化 */
.actions-bar { .actions-bar {