calc(100vh - 100px)
.name{
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: $uni-font-size-sm;
color: $uni-text-color;
}
3.获取dom距离y值的高度
this.offsetValue = this.$refs.nav.height + this.$refs.nav.$el.offsetHeight
4.动态绑定style样式
<div :style="infoBg"></div>
<script>
const bgImg1 =
require("@/assets/images/rongfutong/loan/bg1.png");
data() {
return {
infoBg: {
backgroundImage: "url(" + bgImg1 + ")",
backgroundRepeat: "no-repeat",
backgroundSize: "100% 100%",
},
};
}
<script>
谷歌浏览器在Sources里面打断点进行调试的时候,无法显示Console,点击ESC控制台即可出现,方便打印输出进行调试, 使用 _this 可以查看data数据 和 methords方法
网友评论