提交 b486b986 authored 作者: 邓文彬's avatar 邓文彬

fix(导航栏): mock数据

上级 d39508b8
......@@ -96,6 +96,7 @@
<script lang="ts">
import { defineComponent } from "vue";
import { getNavList } from "./service";
import NavList from "./navList.json"
import { ArrowLeftBold, CaretRight } from "@element-plus/icons";
const ENV_PARAMS = import.meta.env; // 这是Vite官方指导获取环境变量的方式
......@@ -134,11 +135,10 @@ export default defineComponent({
},
created() {},
async mounted() {
const { data: navList } = await getNavList();
this.navList = navList || [];
// @ts-ignore
this.secodndList = navList[this.activeIndex]?.children || [];
this.navList = NavList || [];
// @ts-ignore
this.secodndList = NavList[this.activeIndex]?.children || [];
this.init();
},
......
{
"data": [
{
"icon": "",
"link": "/home",
"name": "首页"
},
{
"icon": "",
"link": "/dataCenter",
"name": "评价指标",
"children": [
{
"icon": "",
"link": "/dataCenter",
"name": "首页"
},
{
"icon": "",
"link": "/dataCenter/army",
"name": "服务强军兴军"
},
{
"icon": "",
"link": "/dataCenter/industrial",
"name": "产业融合发展"
},
{
"icon": "",
"link": "/dataCenter",
"name": "军民协同创新"
},
{
"icon": "",
"link": "/dataCenter",
"name": "资源开放共享"
},
{
"icon": "",
"link": "/dataCenter",
"name": "五大体系建设"
}
]
},
{
"icon": "",
"link": "/",
"name": "动态分析"
},
{
"icon": "",
"link": "/",
"name": "数据填报"
}
],
"success": true,
"errorMsg": "报错信息"
}
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论