feat: 侧边动态路由菜单支持参数

This commit is contained in:
郝先瑞
2024-05-24 18:17:01 +08:00
parent 1c4326fdfa
commit c5f7e4b081
4 changed files with 39 additions and 11 deletions

16
src/views/demo/other.vue Normal file
View File

@@ -0,0 +1,16 @@
<template>
<div>路由参数{{ query }}</div>
</template>
<script setup lang="ts">
defineOptions({
name: "Other",
inheritAttrs: false,
});
import { useRoute } from "vue-router";
// 获取query参数
const query = useRoute().query.type as string;
</script>
<style lang="scss" scoped></style>