Skip to content

Commit fa8cafc

Browse files
author
Stupid
authored
fix(slot): pass right data into component inside slot
1 parent 3ceffd8 commit fa8cafc

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
@@ -14,7 +14,7 @@ export default {
1414
convertComponent (ast, components, slotName) {
1515
const { attrsMap, tag, mpcomid, slots } = ast
1616
if (slotName) {
17-
attrsMap['data'] = `{{...$root[$p], $root}}`
17+
attrsMap['data'] = `{{...$root[$k], $root}}`
1818
attrsMap['is'] = `{{${slotName}}}`
1919
} else {
2020
const slotsName = getSlotsName(slots)

0 commit comments

Comments
 (0)