Vue 文件的一个小细节
top.vue
<template>
<div class="ds">
<div class="left">
<p>SX</p>
</div>
<div class="right">
<p>SB</p>
</div>
</div>
</template>
<script>
console.log("-------------------------"); //只执行一次
export default {
props: [],
data() {
return {}
},
components: {},
methods: {},
created() {},
mounted() {
console.log("$$$$$$$$$$$$"); //执行多次
}
};
</script>
<style lang="scss" scoped="scoped">
.guize {
box-sizing: border-box;
padding: 0 0.4rem;
margin-top: -0.3rem;
width: 100%;
height: 1.2rem;
font-size: 0.24rem;
color: white;
position: relative;
.left {
color: #abc4ed;
float: left;
transform:scale(0.85);
transform-origin:0 0;
p {
font-size: 0.24rem;
line-height: 2;
}
}
.right {
float: left;
width: 1.6rem;
height: 0.44rem;
line-height: 0.44rem;
border: 1px solid white;
color: white;
border-radius: 0.24rem;
text-align: center;
position: absolute;
right: 0.4rem;
bottom: 0.04rem;
}
}
</style>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论