<template>
<div class="box">
</div>
<router-view/>
</template>
<script setup>
const boxWidth = '150px'
</script>
<style lang="scss">
.box{
height: 100px;
width: v-bind(boxWidth);
background-color: red;
}
</style>
04-23
4633
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
02-01
1271
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
12-29
2158
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)