# vue3
获取路由后面的值
import { useRouter } from "vue-router";
const {currentRoute} = useRouter();
const qurl = currentRoute.value.query 获取路由后面的值
1
2
3
2
3
项目模版初始化
<template>
<div class="page-box h100 display-flex czbj">
</div>
</template>
<script lang='ts' setup>
import { ref } from 'vue'
</script>
<style scoped>
</style>
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
css 使用js变量
.text{
top: v-bind(yheight); /*使用js变量 yheigh为js的一个变量或常量*/
}
1
2
3
2
3