<template>
|
<div style="width:1250px;">
|
<RouterView />
|
<div class="routes" v-if="isDev">
|
<RouterLink v-for="item in routes" :key="item.name" :to="item.path">{{
|
item.name
|
}}</RouterLink>
|
</div>
|
</div>
|
</template>
|
<script setup>
|
import routes from "@/router/routes.js";
|
import {getParams} from "./utils/index";
|
import router from './router/index'
|
|
const isDev = isDevelopment;
|
if (isDev) {
|
console.log("开发环境");
|
} else {
|
console.log("生产环境");
|
}
|
let urlParams = getParams(location.href);
|
let routePath = urlParams('ProcessName')
|
if (!!routePath) {
|
router.push({
|
name: routePath
|
});
|
}
|
</script>
|
|
<style lang="less" scoped>
|
.routes {
|
position: fixed;
|
top: 0;
|
left: 0;
|
a{
|
color: #008c8c;
|
border: 1px solid #008c8c;
|
margin: 5px;
|
&:hover{
|
background-color: #e0e0e0;
|
}
|
}
|
}
|
</style>
|