美文网首页
Vue学习知识技巧

Vue学习知识技巧

作者: iOS乐乐 | 来源:发表于2021-01-24 11:05 被阅读0次
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方法

相关文章

网友评论

      本文标题:Vue学习知识技巧

      本文链接:https://www.haomeiwen.com/subject/zvqmzktx.html