Commit d147911a by pangchong

feat: 解决ios底部兼容问题

parent ff3315a9
......@@ -84,8 +84,8 @@
<slot v-else></slot>
</view>
<!-- 底部 -->
<template #bottom>
<view class="footer-btn" v-if="showFooterBtn">
<template #bottom v-if="showBottom">
<view class="footer-btn" v-if="showFooterBtn" :style="{ visibility: showBottom ? 'visible' : 'hidden' }">
<global-button type="primary" size="large" @tap="handleFooterClick">{{ footerBtnText }}</global-button>
</view>
<slot name="bottom"></slot>
......@@ -476,6 +476,14 @@ defineExpose({
},
element: paging
})
//处理ios底部兼容问题
const showBottom = ref(true)
uni.$on('changeShowBottom', (boolean) => {
const systemInfo = uni.getSystemInfoSync()
if (systemInfo.platform === 'ios') {
showBottom.value = !boolean
}
})
</script>
<script>
export default {
......
......@@ -287,6 +287,9 @@ watch(
},
{ immediate: true }
)
watch(show, (value) => {
uni.$emit('changeShowBottom', value)
})
//点击确定按钮
const confirm = (e) => {
show.value = false
......
......@@ -120,6 +120,7 @@ watch(
scrollTop.value = ps.distance > 0 ? ps.distance : oldScrollTop.value
})
}
uni.$emit('changeShowBottom', value)
}
)
const close = () => {
......
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