小编Kus*_*mal的帖子

如何根据材质UI(React JS)中的需要制作"选择"组件

除非有选定的选项,否则我希望显示为红色错误.有没有办法做到这一点.

javascript css frontend reactjs material-ui

9
推荐指数
1
解决办法
9388
查看次数

我为什么会收到此错误-“您正在使用未定义的组件调用withTheme(Component)。” -反应JS

在此处输入图片说明

安装一些“ material-ui”软件包后,出现此错误。我尝试了几种解决方案,但仍未解决。请帮忙?

javascript styles web reactjs material-ui

5
推荐指数
1
解决办法
1182
查看次数

onSelectSlot 在 Mobile React Big calendar 中不起作用

OnSelectSlot 在移动浏览器中不起作用。在 Android 设备中,我用 chrome 浏览器对其进行了调试,但没有奏效。在 IOS 设备中,我使用 Safari 浏览器进行了调试,但也无法正常工作。在计算机浏览器中,单击它时可以顺利运行,但在手机上则不然。有谁知道解决这个问题的方法?

下面是代码-------------------

           <BigCalendar
                selectable
                events={[
                    {
                        id: 0,
                        title: <div>{this.state.morningShiftAppointments + this.state.eveningShiftAppointments}<br/>
                            <div>{this.state.morningShiftAppointments}/{this.state.eveningShiftAppointments}</div>
                        </div>,
                        allDay: true,
                        start: new Date(this.state.year, this.state.month, this.state.date),
                        end: new Date(this.state.year, this.state.month, this.state.date),
                    }
                ]}
                views={['month']}
                onSelectSlot={this.onSelectSlot.bind(this)}
                dayPropGetter={customDayPropGetter}
                longPressThreshold={1}
                defaultDate={new Date()}
                eventPropGetter={
                    (event, start, end, isSelected) => {
                        let newStyle = {
                            backgroundColor: "lightgrey",
                            color: 'black',
                            borderRadius: "0px",
                            border: "none",
                            minWidth: "100%"
                        };
                        return {
                            className: "",
                            style: newStyle
                        };
                    }
                }
            />
Run Code Online (Sandbox Code Playgroud)

javascript fullcalendar reactjs react-big-calendar

4
推荐指数
1
解决办法
1552
查看次数