提交 12536093 编写于 作者: fxy060608's avatar fxy060608

fix(mp-weixin): Scoped Slots #1662

上级 0972d19b
......@@ -46,14 +46,15 @@ module.exports = {
if (!state.scopedSlots) {
state.scopedSlots = {}
}
let componentName = `${ownerName}-${parentName}-${slotName}`
if (!hasOwn(state.scopedSlots, componentName)) {
state.scopedSlots[componentName] = 0
const baseName = `${ownerName}-${parentName}-${slotName}`
let componentName = baseName
if (!hasOwn(state.scopedSlots, baseName)) {
state.scopedSlots[baseName] = 0
}
if (state.scopedSlots[componentName]) {
componentName = componentName + state.scopedSlots[componentName]
if (state.scopedSlots[baseName]) {
componentName = baseName + state.scopedSlots[baseName]
}
state.scopedSlots[componentName]++
state.scopedSlots[baseName]++
parentNode.attr['generic:scoped-slots-' + slotName] = componentName
if (!parentNode.attr.generic) {
parentNode.attr.generic = {}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册