不能调用可能是“未定义”的对象。ts(2722) Cannot invoke an object which is possibly ‘undefined‘.

不能调用可能是“未定义”的对象。ts(2722) Cannot invoke an object which is possibly ‘undefined‘._第1张图片
解决:

 // 不能调用可能是“未定义”的对象。ts(2722) Cannot invoke an object which is possibly 'undefined'.
    let sl = ctx.slots?.slotzhu!()[0].children

你可能感兴趣的:(vue.js)