dcloudio / dcloudio/uni-app

【bug】钉钉小程序在存在插槽后备内容的情况下,作用域插槽无效

Open
#4,947 3 comments 0 reactions 0 assignees View on GitHub
mp-dingtalk vue2
Dominant language
JavaScript
Stars
41.6k
Forks
3.7k
Avg merge
7h 6m
Merged PRs (30d)
6

Description

### 版本信息
HbuilderX 4.15
uni-ui 1.5.0
vue 2
### 代码片段
demo.vue (页面)
```




{{ listItem.header }}
{{ listItem.body }}
{{ listItem.footer }}


export default {
data() {
return {
list: [
{header: '1', body: '1', footer: '1'},
{header: '2', body: '2', footer: '2'},
{header: '3', body: '3', footer: '3'},
{header: '4', body: '4', footer: '4'},
{header: '5', body: '5', footer: '5'},
{header: '6', body: '6', footer: '6'},
{header: '7', body: '7', footer: '7'},
{header: '8', body: '8', footer: '8'},
{header: '9', body: '9', footer: '9'},
{header: '0', body: '0', footer: '0'},
]
};
}
}

```
slotTest.vue (组件)
```









header




body




footer







export default {
props: {
list: {
type: Array,
default: () => []
}
},
data() {
return {}
},
methods: {}
};

```
### 复现步骤
图示:
![image](https://github.com/dcloudio/uni-app/assets/48954949/fd4cb778-d4b8-488a-8f6a-e21a684bb7cb)
如果把组件中 "后备内容 start" 至 "后备内容 end" 间元素注释掉,就会渲染出正常的数据了
![image](https://github.com/dcloudio/uni-app/assets/48954949/a0f4c691-4a00-4ea6-a7cd-cfc072bd7018)

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.