This commit is contained in:
itcsx committed 2026-09-19 10:24:21 +08:00
1 parent 9344b56334
commit 441d1e821e
37 files changed
+3706 -23

No files matched your search

+11 -1
View File
@@ -32,7 +32,7 @@
type="text"
class="nav-btn"
:loading="loading"
@click="onBreadcrumbClick(breadcrumbItems[0], 0)"
@click="onRefresh"
>
<ReloadOutlined />
</a-button> </a-tooltip
@@ -248,6 +248,16 @@ const onSearch = () => {
const onBreadcrumbClick = (item: BreadcrumbItem, index: number) => {
emit("breadcrumb-click", item, index);
};
/**
* 刷新:重新加载「当前所在目录」,也就是路径的最后一个节点。
* 不能取第一个节点,否则会把路径截回到根目录,变成跳转而不是刷新。
*/
const onRefresh = () => {
const lastIndex = breadcrumbItems.value.length - 1;
if (lastIndex < 0) return;
onBreadcrumbClick(breadcrumbItems.value[lastIndex], lastIndex);
};
</script>
<style lang="less">