note744917
note744917
  • 发布:2023-03-01 20:11
  • 更新:2023-03-01 20:11
  • 阅读:291

在globalStyle中设置原生子窗体的话调用show方法不显示

分类:uni-app

在pages.js的globalStyle节点配置app-plus - subNVues,重新编译项目并真机基础基座运行

在项目任何页面 调用uni.getSubNVueById('drawer').show('slide-in-left', 200) 显示子窗体

子窗体区域仅显示白色区块,path的内容未显示,貌似是没有把path里的nvue文件加载进来

"globalStyle": {  
"pageOrientation": "portrait",  
"navigationBarTitleText": "Hello uniapp",  
"navigationBarTextStyle": "white",  
"navigationBarBackgroundColor": "#007AFF",  
"backgroundColor": "#F8F8F8",  
"backgroundColorTop": "#F4F5F6",  
"backgroundColorBottom": "#F4F5F6",  
"mp-360": {  
"navigationStyle": "custom"  
},  
"h5": {  
"maxWidth": 1190,  
"navigationBarTextStyle": "black",  
"navigationBarBackgroundColor": "#F1F1F1"  
},  
"app-plus": {  
"subNVues": [{  
"id": "drawer",  
"path": "pages/API/subnvue/subnvue/drawer",  
"type": "popup",  
"style": {  
"width": "50%"  
}  
}, {  
"id": "popup",  
"path": "pages/API/subnvue/subnvue/popup",  
"type": "popup",  
"style": {  
"margin": "auto",  
"width": "80%",  
"height": "600rpx"  
}  
}, {  
"id": "video_mask",  
"path":"pages/API/subnvue/subnvue/video-mask",  
"style": {  
"position": "absolute",  
"bottom": "30px",  
"left": "0",  
"width": "230px",  
"height": "110px",  
"background": "transparent"  
}  
}]  
}  

},
2023-03-01 20:11 负责人:无 分享
已邀请:

要回复问题请先登录注册