uniapp 里使用 wx-open-launch-weapp 标签报错问题解决方案

1,634 阅读1分钟

如果在uniapp里直接使用在h5里打开小程序的标签 wx-open-launch-weapp,则会提示错误: Unknown custom element: - did you register the component

image.png

解决方案: 1、在main.js 里添加一行代码 Vue.config.ignoredElements.push('wx-open-launch-weapp') 2、注意:必须是 push,不然会让uniapp的标签失效

image.png