Commit a8fcd0ca authored by JingChao's avatar JingChao

scoll组建top自动计算距离修复

parent aab09c93
{
"name": "hls-easy-ui",
"version": "0.0.5",
"version": "0.0.6",
"description": "A Vue components project",
"author": "JingChao <jingchao.wu@hand-china.com>",
"private": false,
......
.has-footer {
padding-bottom: 0.88rem;
.scrollContent{
padding-bottom: 1.76rem;
// padding-bottom: 1.76rem;
}
}
......
......@@ -6,7 +6,7 @@
.has-footer {
// padding-bottom: 2.16rem;
.scrollContent{
padding-bottom: 2.16rem;
// padding-bottom: 2.16rem;
}
}
......
......@@ -10,7 +10,7 @@
.has-footer {
padding-bottom: 1.6rem;
.scrollContent{
padding-bottom: 2.84rem;
// padding-bottom: 2.84rem;
}
}
......@@ -36,7 +36,7 @@
.has-footer {
padding-bottom: 1.6rem;
.scrollContent{
padding-bottom: 2.84rem;
// padding-bottom: 2.84rem;
}
}
......
......@@ -189,6 +189,8 @@ export default {
isIos: false,
fullScreen: true,
fontSize: Number(window.document.documentElement.style.fontSize.replace('px', '')),
winHeight: window.innerHeight,
winWidth: window.innerWidth,
}
},
computed: {
......@@ -289,9 +291,10 @@ export default {
// 设置scrollContent的最小高,实现高度不足时也有回弹效果
if (this.$refs.scrollContent) {
// const headerHeight = vm.getHeaderHeight()
const headerHeight = vm.getHeaderHeight()
// const nextHeight = vm.getNextElementHeight()
this.$refs.scrollContent.style.minHeight = `${this.$refs.scroll.getBoundingClientRect().height + 1}px`
this.$refs.scrollContent.style.paddingTop = `${headerHeight}px`
if (vm.hasFoot.footFlag) {
let height = vm.hasFoot.height || 88
// this.$refs.scrollContent.style.minHeight = `${this.$refs.scroll.getBoundingClientRect().height - height}px`
......@@ -460,7 +463,8 @@ export default {
width 100%
overflow hidden !important
box-sizing border-box
position relative
position absolute !important
top 0
height 100%
&__wrapper {
......@@ -474,7 +478,7 @@ export default {
text-size-adjust: none;
-webkit-transform-origin: left top;
transform-origin: left top;
padding-bottom: 0.9rem;
padding-bottom: 0.4rem;
}
&__pullup {
......@@ -513,20 +517,24 @@ export default {
}
}
}
.has-footer {
.vue-better-scroll__wrapper {
padding-bottom: 1rem;
}
}
.platform-ios{
.vue-better-scroll {
&__wrapper {
// padding-bottom: 2.16rem;
.has-footer {
.vue-better-scroll__wrapper {
padding-bottom: 1rem;
}
}
}
// iPhoneX适配
@media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) {
.platform-ios {
.vue-better-scroll {
&__wrapper {
// padding-bottom: 2.84rem;
.has-footer {
.vue-better-scroll__wrapper {
padding-bottom: 1.8rem;
}
}
}
......@@ -535,9 +543,9 @@ export default {
// iPhoneX Max适配
@media (device-width: 414px) and (device-height: 896px) {
.platform-ios {
.vue-better-scroll {
&__wrapper {
// padding-bottom: 2.84rem;
.has-footer {
.vue-better-scroll__wrapper {
padding-bottom: 1.8rem;
}
}
}
......
......@@ -23,7 +23,9 @@
<tab-item>涉诉公告</tab-item>
<tab-item>司法协助</tab-item>
</s-tab>
<h-content :listen-scroll="true" class="has-footer" @scroll="scrollListen">
<scroll
ref="scrollList" :listen-scroll="true" :pullUp="true" class="has-footer"
@scroll="scrollListen">
<h-button class="button-class" type="primary" @click.native="showLoading">showLoading</h-button>
<h-button class="button-class" type="primary" @click.native="hideLoading">hideLoading</h-button>
<h-button class="button-class" type="primary" @click.native="showLongTop">showLongTop</h-button>
......@@ -239,7 +241,7 @@
</div>
<h2 class="item-title">Modal</h2>
<h-button class="button-class" type="primary" @click.native="showModal">Modal</h-button>
</h-content>
</scroll>
<bottom-tab :show-divider="true">
<tab-button cusClass="button-exit" @click.native="showConfirm"><img
......@@ -324,10 +326,11 @@ export default {
}).then((modal) => {
this.modal = modal;
}) */
this.$refs.scrollList.update(true)
},
methods: {
scrollListen (e) {
console.log('scroll listen:' + JSON.stringify(e,'',2))
console.log('scroll listen:' + JSON.stringify(e, '', 2))
},
stab () {
console.log('tab-click')
......
......@@ -10,7 +10,7 @@ export default {
window.localStorage.setItem('registrationID', data)
}
if (data.length === 0) {
window.setTimeout(this.getRegistrationID, 1000)
window.setTimeout(this.getRegistrationID.bind(this), 1000)
}
} catch (exception) {
// alert(angular.toJson(exception));
......@@ -18,7 +18,7 @@ export default {
},
// 获取设备号
getRegistrationID: function () {
window.plugins.jPushPlugin.getRegistrationID(this.onGetRegistrationID)
window.plugins.jPushPlugin.getRegistrationID(this.onGetRegistrationID.bind(this))
},
onReceiveNotification: function (event) {
try {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment