Skip to content

Commit ed2e02f

Browse files
authored
Merge pull request #1121 from Meituan-Dianping/fix/slot
fix: slot data 缺失
2 parents d9d64d5 + dcc5025 commit ed2e02f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/platforms/mp/compiler/codegen/convert/component.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default {
3232
convertComponent (ast, components, slotName) {
3333
const { attrsMap, tag, mpcomid, slots } = ast
3434
if (slotName) {
35-
attrsMap['data'] = "{{...$root[$k], $root}}"
35+
attrsMap['data'] = "{{...$root[$p], ...$root[$k], $root}}"
3636
// bindedName is available when rendering slot in v-for
3737
const bindedName = attrsMap['v-bind:name']
3838
if(bindedName) {

0 commit comments

Comments
 (0)