zfyhaha
zfyhaha
  • 发布:2020-06-15 18:06
  • 更新:2020-06-15 20:18
  • 阅读:646

更新hbuiderX后 子窗体出错

分类:nvue

子窗体 :

    <div class="scroll">  
        <div  
            class="tab-bar-item"  
            :class="[tabIndex === t ? 'active' : '']"  
            v-for="(tabBar, t) in tabBars"  
            :key="t"  
            :ref="tabBar.id + t"  
            @click="change(t)"  
        >  
            <text class="tab-bar-title" :class="[tabIndex === t ? 'active' : '']">{{tabBar.name}}</text>  
        </div>  
    </div>  
</template>  

<script>  

    export default {  
        data() {  
            return {  
                tabBars:[  
                    {name:'全部'},  
                    {name:'最新'},  
                    {name:'推荐'},  
                    {name:'公告'}  
                ],  
                tabIndex:0  
            }  

        },  
        methods: {  
           change(Inv, e) {  
                uni.$emit('_navClick', Inv);  
                this.tabIndex = Inv;  
            }  
        }  
    }  
</script>  

<style>  
.scroll {  
    flex-direction: row;  
    justify-content: space-between;  
    align-items: center;  
    width: 750px;  
    height: 98px;  
    line-height: 98px;  
    background-color: #ff0018;/* #EA6169 */  
    font-size: 14px;  
    color: #FFCBD9;  
}  
.tab-bar-item{  
    flex-direction:column;  
    justify-content:center;  
    align-items: center;  
    flex: 1;  
    color: #FFCBD9;  
}  
.tab-bar-title{  
    font-size: 26;  
    color: #FFCBD9;  
}  
.active {  
    color: #FFFFFF;  
    font-size: 28;  
}  
</style>

page.json:

"subNVues": [  
                        {  
                            "id": "navTab",   
                            "path": "pages/index/subNvue/nav",   
                            "style": {    
                                "position": "absolute",  
                                "top":"135upx",  
                                "height": "100upx"   
                            }    
                        },  
] 

vue页面调用:```
const subNVue1 = uni.getSubNVueById('navTab')
subNVue1.show();

uni.$on('navClick', (Inv) => {
this.Inv = Inv;
this.refreshPage(true);
this.videoContext = uni.createVideoContext("video
" + this.playIngIndex);
this.videoContext1 = uni.createVideoContext("video1" + this.playIngIndex);
this.videoContext2 = uni.createVideoContext("video2
" + this.playIngIndex);
that.videoContext.pause();
that.videoContext1.pause();
that.videoContext2.pause();
})



结果:不显示子窗体 
2020-06-15 18:06 负责人:无 分享
已邀请:
DCloud_uniCloud_WYQ

DCloud_uniCloud_WYQ

你说的之前能正常显示是用的weex模式吧,现在需要自己配置一下,你这个版本得有很久没更新了吧

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