每次我在vscode中运行npm start时,我都会收到奇怪的UI错误,比如
Module parse failed: D:\Websites\rugprints\rugprints\node_modules\@mui\material\node\styles\createTransitions.js Unexpected token (58:40)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (58:40)
@ ./~/@mui/material/no
我正在尝试运行一个react应用程序,但是接下来会出现错误。
ERROR in ./node_modules/@mui/styled-engine/GlobalStyles/GlobalStyles.js 3:0-40
ERROR in ./node_modules/@mui/styled-engine/StyledEngineProvider/StyledEngineProvider.js 3:0-47
ERROR in ./node_modules/@mui/styled-engine/index.js 6:0-39
ERROR in ./node_modules/@mui/styled-
我有2页,第一个Appbar.js,我有我的顶部应用程序条和导航菜单图标按钮,当我按下,我希望我的抽屉(材料UI)在TempDrawer.js显示。
当我将所有代码都放在Appbar.js文件中时,它起了作用,但我想以某种方式将这两个页面链接起来,使Appbar.js中有按钮,但函数并返回到TempDrawer.js中。
这是因为我将TemporaryDrawer()称为另一个文件中的标记(<TemporaryDrawer/>)。
Appbar.js:
import * as React from 'react';
import Box from '@mui
我正在为GUI、电子和领域使用React进行一个项目。
在我尝试从另一个.js文件导入一个“组件”之前,一切都很好
以下是我的App.js导入部分:
import logo from './logo.svg';
import './App.css';
import * as Realm from 'realm';
import Avatar from '@mui/material/Avatar';
import Button from '@mui/material/Button';
import CssBaseli
我一直在使用bootstrap,我发现material ui也是一个很好的框架,并决定开始学习如何使用它。在进入MUI组件时,我被卡住了。我想知道如何在不进行自定义的情况下使用默认的MUI组件。例如,我想复制card component并在浏览器上输出它。
例如,其中一个文档的代码是:
import * as React from 'react';
import Card from '@mui/material/Card';
import CardContent from '@mui/material/CardContent';
import C
我在我的应用程序中添加了一个DateTimePicker,这似乎很有效,但是,我无法在Jest测试中嘲笑这个选择器。
我一直收到以下错误:
Test suite failed to run
TypeError: (0 , _material.generateUtilityClasses) is not a function
7 | import type { Property, EnumProperty } from "../../types";
> 8 | import { DateTimePicker } from "@mu
如果我试图使用npm install @mui/material在我的react应用程序中安装MUI,我会得到一些错误:
Compiled with problems:X
ERROR in ./node_modules/@mui/material/node_modules/react-transition-group/esm/CSSTransition.js 5:0-47
Module not found: Error: Can't resolve 'dom-helpers/addClass' in 'C:\Users\User\Desktop\test\a
用户可以根据所选内容选择另一个select将出现的类别。我在另一个.js中创建了第二个组件。我已经可以查看数据,但是如何将第二个组件的值传递给父组件呢?
我想将select的值从size1,js传递给demo.js
链接:
demo.js
import * as React from "react";
import Box from "@mui/material/Box";
import InputLabel from "@mui/material/InputLabel";
import MenuItem from "@mui/mater
当我试图运行react项目时,tsconfig文件被自动更改为"jsx": "preserve",之后我得到了这样的错误
×
←→1 of 3 errors on the page
ReferenceError: React is not defined
App
C:/Users/AntonyPraveenkumarMo/01_antony/Personalspace/fullstack/React MUI/react-mui-demo/src/App.tsx:6
3 | import CustomRoutes from './components/
我正在升级到MUI5。TS编译通过了,但是我得到了大量的控制台错误:Module not found: Can't resolve '@mui/material/unstable_composeClasses'和./node_modules/@mui/lab/node_modules/@mui/x-date-pickers/CalendarPicker/calendarPickerClasses.js Module not found: Can't resolve '@mui/material/generateUtilityClass' in .
我已经建立了一个项目使用材料用户界面和反应JS。不给我的应用程序添加任何东西。我犯了一个奇怪的错误,我不知道为什么。我试过在MUI上创建一个问题,但没有得到回答。
使用npx-create-react-app创建App
这是我得到的错误:
/node_modules/@mui/system/colorManipulator.js Unexpected token (231:67)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (231:67)
@ ./~/@m
/** @license MUI v5.0.0-alpha.63
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/* eslint-disable import/export */
export { default as Alert } from './Alert';
export * from './Alert';
export { defau
我正在使用React的Modal组件和MUI的
基本上,我有一个打开的按钮,打开一个模式弹出,里面有一个选择组件。
但是,当我打开控制台时,当我打开模式并从“选择”菜单中选择某些内容时,它会产生以下错误:
at HTMLDocument.contain (TrapFocus.js:214:1)
at Object.current (Modal.js:131:1)
at useEventCallback.js:19:1
at Object.current (Modal.js:139:1)
at HTMLDocument.<anonymous>
在我没有在SidebarOption.js中使用SidebarOption.js组件之前,这个应用程序运行得很好。一旦我将其放入其中,就会呈现一个空白页,控制台将弹出以下错误
expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixe
在创建导航条时,我使用了来自MUI的多个折叠组件,以创建生成菜单项。
这不是一个代码破坏错误,而是一个恼人的错误。我在我的控制台中得到以下错误。
Warning: Encountered two children with the same key, `indexCollapseListItem`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted —
我刚安装了梅,发现了这样的消息:
Compiled with problems:
ERROR in ./node_modules/@mui/material/AccordionActions/AccordionActions.js 7:0-70
Module not found: Error: Can't resolve '@mui/base' in 'C:\..\node_modules\@mui\material\AccordionActions'
顺便说一下,我用纱线。在终点站我得到
webpack compiled with 253 erro
有人知道如何通过输入向AgGrid添加多个行吗?
我有一个弹出输入,在这里我可以输入我想要添加的行数。我使用console.log从输入中获取数字。
form.js
import * as React from 'react';
import Button from '@mui/material/Button';
import TextField from '@mui/material/TextField';
import Dialog from '@mui/material/Dialog';
import DialogActio