better-scroll插件无法滚动原因排除
链接:https://www.jianshu.com/p/dee1fc22f6cb
//vue组件
<template>
<div class="detail">
<scroll class="content">
aaaa
</scroll>
</div>
</template>
<script>import scroll from "components/common/scroll";
export default {
name: "detail",
data() {
return {
};
},
components: {
scroll
},
},
mounted() {},
methods: {}
};
</script>
<style lang="less" scoped>
.detail {
height: 100vh;
}
.content {
height: calc(100% - 44px);//100%是相对于父元素detail的,记得符号左右两边有空格
}
</style>
注:以上内容仅用于日常学习