优化 router.query 取值

This commit is contained in:
icssoa
2025-10-28 11:31:49 +08:00
parent f651f8e8bd
commit 4228a62d86
2 changed files with 17 additions and 4 deletions

View File

@@ -15,7 +15,7 @@
<script lang="ts" setup>
import { t } from "@/locale";
import DemoItem from "../../components/item.uvue";
import { userInfo, useStore } from "@/cool";
import { router, userInfo, useStore } from "@/cool";
const { user } = useStore();
@@ -24,6 +24,11 @@ const props = defineProps({
type: String
}
});
onReady(() => {
const query = router.query();
console.log(query);
});
</script>
<style lang="scss" scoped></style>