dcloudio / dcloudio/uni-app

vue2 动态插槽和作用域插槽同时使用打包成微信小程序,在微信开发者工具编译报错问题

Open
#5,182 2 comments 0 reactions 0 assignees View on GitHub
mp-weixin vue2 提供了复现方案
Dominant language
JavaScript
Stars
41.6k
Forks
3.7k
Avg merge
7h 6m
Merged PRs (30d)
6

Description

在组件中如果有同时使用动态插槽和作用域插槽同时使用 HBuilder X 能正常打包为微信小程序,但是在微信开发者工具中运行会报错,在h5访问是正常的。已经在 `manifest.json` 文件中配置了 `"scopedSlotsCompiler": "augmented"` 和 `"slotMultipleInstance": true`

伪代码如下:
```

默认内容

```

项目是通过 HBuilder X 创建的uni-app 默认模板使用的是 vue2,HBuilder X 版本号为4.29.2024093009

能够复现问题的代码如下:
[uni-app-slot.zip](https://github.com/user-attachments/files/17321162/uni-app-slot.zip)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.