3***@qq.com
3***@qq.com
  • 发布:2021-05-28 15:41
  • 更新:2021-05-28 16:24
  • 阅读:687

#插件讨论# 【 日期区间picker - panyh 】 ios端 组件嵌套后显示被覆盖这个问题咋解决啊

分类:uni-app

第一张图是安卓的, 第二张图是ios 发布的小程序有问题 , 微信开发者工具显示效果和第一张安卓端显示的效果一样

筛选时间的组件我是嵌套在组件里的

2021-05-28 15:41 负责人:无 分享
已邀请:
panyh

panyh - p

你左边列表的样式发下,目测是左边列表的样式层级优先于我的组件,我的组件的样式为:position: fixed;z-index: 998;

panyh

panyh - p

你可以从以下方面入手:

1、把组件放到template最底部

2、检查css层级问题

3、检查层级兼容性

3***@qq.com

3***@qq.com (作者)

这是一个组件,

<template>  
    <v-tabs-column :isTabbar="true" height="calc(100vh - 120px)" :tabs="data" position="left" v-model="currentIndex" @change="sectionChange">  
        <CountStatistics ref="CountStatistics" v-if="currentIndex == 0" />  
    </v-tabs-column>  
</template>  
<script>  
    import CountStatistics from './CountStatistics'  
    export default {  
        components: {  
            CountStatistics,  
        },  
        data() {  
            return {  
                data: [  
                    "单数分布",  
                ],  
                currentIndex: 0,  
            }  
        },  
        methods: {  
            sectionChange(index) {  
                this.currentIndex = index;  
                switch (index) {  
                    case 0:  
                        this.$nextTick(() => {  
                            this.$refs.CountStatistics.init();  
                        })  
                        break;  
                    default:  
                        break;  
                }  
            },  
            init() {  
                this.$nextTick(() => {  
                    this.$refs.CountStatistics.init();  
                })  
            }  
        }  
    }  
</script>  

<style lang="scss" scoped>  
    .v-tabs-column {  
        display: flex;  
        ::-webkit-scrollbar {  
            display: none;  
        }  

        &__bar {  
            padding-top: 46rpx;  
            &-item {  
                text-align: center;  
                position: relative;  
                transition: all 0.3s;  
                text-overflow: ellipsis;  
                overflow: hidden;  
                // white-space: nowrap;  
                height: 120upx;  
            }  
        }  
        &__container {  
            box-shadow: 0px 0px 16rpx rgba(0, 0, 0, 0.08);  
        }  
    }  
</style>  
  • 3***@qq.com (作者)

    这个style是v-tabs-column 组件里的样式

    2021-05-28 16:12

panyh

panyh - p

目测是组件间样式冲突,建议修改方案如下:

1、两个组件不嵌套,同级放到页面内

2、进入时间组件内,把组件层级调最高(高于v-tabs-column)

该问题目前已经被锁定, 无法添加新回复