9***@qq.com
9***@qq.com
  • 发布:2022-04-18 16:55
  • 更新:2022-04-18 16:55
  • 阅读:266

subnvue组件打包后元素不存在

分类:nvue

在页面中使用了subNvue组件,使用自定义基座和标准基座调试样式正常,离线打包后,subNvue只剩下pages.json中配置的背景色

<template>  
  <div>  
    <text class="title" style="font-size: 16rpx; color: #007AFF;">ceshi</text>  
    <image src="../../../static/imgs/bz2.png"></image>  
  </div>  
</template>  

<script>  
  export default {  
    data() {  
      return {  

      }  
    },  
    methods: {  

    }  
  }  
</script>  

<style lang="scss">  
.title{  
  font-size: 16rpx;  
  color: #007AFF;  
}  
</style>  
onReady() {  
      const testSub = uni.getSubNVueById('testSub')  
      testSub.show('fade-in', 200)  
    }
2022-04-18 16:55 负责人:无 分享
已邀请:

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