【发布时间】:2019-01-24 05:16:18
【问题描述】:
收到类似 TypeError 登陆的错误。插槽未定义
<div className="notification" />
</header>
<main
style={
ready
? {}
: {
height: "100vh",
overflow: "hidden"
}
}>
<LandingLoader className={ready ? "fade-out" : ""} />
<ul
className="slots"
style={{
visibility: ready ? "visible" : "hidden"
}}>
{landing &&
landing.Slots.map((slot,index) => {
if (slot && !slot.removed) {
let fullWidth = "100%";
let maxWidth = 576;
let style = {};
style["width"] = fullWidth;
style["maxWidth"] = fullWidth;
style["height"] = slot.HeightPixel + "px";
return (
<li key={index} className="slots" style={style}>
<Slot slotItem={slot} slotIndex={index} />
</li>
);
}
})}
</ul>
</main>
</div>
【问题讨论】: