环境:uniapp+vue3+vite
开发者工具版本:稳定版2.01.2510290
hbuildx版本:5.07
系统版本:10.0.22631版本22631
主要代码
<wx-open-subscribe v-if="showSubscribe" v-pre template="-PMwgQjttL4I4y42m4mpEDruxVPCUHSRA4ZjbDQ_7x8" id="subscribe-btn" style="width:200px;height:60px;background:red">
<template slot="style">
<style>
.subscribe-btn {
color: #fff;
background-color: #07c160;
}
</style>
</template>
<template>
<button class="subscribe-btn">
一次性模版消息订阅
</button>
</template>
</wx-open-subscribe>
vite配置
plugins: [uni({
vueOptions: {
template: {
compilerOptions: {
isCustomElement: (tag) => tag.startsWith('wx-')
}
}
}
})],
这里用过component is的属性,但是仍然会提示下图错误,请问这到底是哪里出的问题呢?