forked from integrated_whb/integrated_whb_vue
提示当前路由文件位置
parent
4976baad59
commit
83dd3a57a9
|
@ -3,7 +3,28 @@
|
|||
style="display: flex; justify-content: space-between; align-items: center"
|
||||
>
|
||||
<div class="breadcrumb">
|
||||
<el-tooltip
|
||||
v-if="isDEV"
|
||||
placement="top"
|
||||
:content="
|
||||
route.matched
|
||||
.at(-1)
|
||||
.components.default.__file.substring(
|
||||
route.matched
|
||||
.at(-1)
|
||||
.components.default.__file.indexOf('src/views')
|
||||
)
|
||||
"
|
||||
>
|
||||
<icon-local theme="filled" size="22" fill="#10a7e5" :stroke-width="3" />
|
||||
</el-tooltip>
|
||||
<icon-local
|
||||
v-else
|
||||
theme="filled"
|
||||
size="22"
|
||||
fill="#10a7e5"
|
||||
:stroke-width="3"
|
||||
/>
|
||||
<el-breadcrumb class="app-breadcrumb" separator=">">
|
||||
<transition-group name="breadcrumb">
|
||||
<el-breadcrumb-item
|
||||
|
@ -23,15 +44,15 @@
|
|||
</div>
|
||||
<div class="return">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="$router.back()"
|
||||
v-if="
|
||||
route.meta?.activeMenu &&
|
||||
route.path &&
|
||||
route.meta?.activeMenu !== route.path
|
||||
"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="$router.back()"
|
||||
>
|
||||
返回上一页
|
||||
</el-button>
|
||||
|
@ -46,6 +67,7 @@ import { useRoute } from "vue-router";
|
|||
defineOptions({
|
||||
name: "LayoutBreadcrumb",
|
||||
});
|
||||
const isDEV = import.meta.env.DEV;
|
||||
const route = useRoute();
|
||||
const data = reactive({
|
||||
breadcrumbList: [],
|
||||
|
|
Loading…
Reference in New Issue