uni-app vue3 微信小程序 插槽默认内容编译不生效
uni-app vue3 微信小程序 插槽默认内容编译不生效
操作步骤:
- 参考bug描述
预期结果:
- 显示插槽默认内容
实际结果:
- 未显示
bug描述:
// index.vue
<template>
<view>
<Test>
<template #header>
</template>
</Test>
</view>
</template>
<script setup>
import Test from "./Test.vue";
</script>
// Test.vue
<template>
<view>
<slot name="header">默认插槽</slot>
</view>
</template>
编译到微信小程序,不生效,编译到h5就有效果。

更多关于uni-app vue3 微信小程序 插槽默认内容编译不生效的实战教程也可以访问 https://www.itying.com/category-93-b0.html
4 回复
感谢反馈,问题已复现,已加分。
更多关于uni-app vue3 微信小程序 插槽默认内容编译不生效的实战教程也可以访问 https://www.itying.com/category-93-b0.html
感谢,期待修复。
hbuilderx 4.76.2025073103-alpha 版本已修复此问题,可升级到此版本。


