getAndRemoveAttr(el, 'slot-scope'))) {
el.slotScope = slotScope
}
从上面的代码我们能看出,Vue.js 直接读取 slot-scope 属性并赋值给...字符串的:
function genScopedSlot (
key: string,
el: ASTElement,
state: CodegenState
): string {...def(res, '$key', key)
def(res, '$hasNormal', hasNormalSlots)
// 否则,则对 slots 对象进行遍历,操作 normalSlots ,赋值给...function normalizeScopedSlot(normalSlots, key, fn) {
const normalized = function () {
// 若参数为多个...(el, slotRE)
// 若 slotBinding 存在,则继续进行 slotName 的正则匹配
// 随即将匹配出来的 name 赋值给 slotTarget,dynamic 赋值给