我使用的是Reactjs在Laravel。在这里我改变了我的阵营组件的一些变化,当我刷新我的浏览器,然后更改都不会显示。
文件:
资源/视图/welcome.blade.php
<!doctype html>
<html lang="{{ app()->getLocale() }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>arjunphp.com | Laravel 5.6 with React JS</title>
<link href="{{asset('css/app.css')}}" rel="stylesheet" type="text/css">
</head>
<body>
<div id="example"></div>
<script src="{{asset('js/app.js')}}" ></script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)资源/资产/js/app.js
/**
* First we will load all of this project's JavaScript dependencies which
* includes React and other helpers. It's a great starting point while
* building robust, powerful web applications using React + Laravel.
*/ …Run Code Online (Sandbox Code Playgroud)我正在尝试基于此示例构建基于 Redux 的通知器:https : //material-ui.com/components/snackbars/#CustomizedSnackbars.tsx
这就是我想出的:
import { Snackbar } from '@material-ui/core';
import MuiAlert, { AlertProps } from '@material-ui/lab/Alert';
import React from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import { ProgramCategoryActions } from '../../program/store/program-category.actions';
import { NotificationState } from './model/notification-state';
import { NotificationSelectors } from './store/notification.selectors';
interface NotificatorProps {
notification?: NotificationState;
close: () => void;
}
// tslint:disable-next-line:function-name
function Alert(props: AlertProps) {
return <MuiAlert elevation={6} variant="filled" {...props} />;
}
export const PureNotificator: …Run Code Online (Sandbox Code Playgroud) 我真的很困惑 -这个使用 React MaterialUI 的例子说我可以将它用于 Snackbar:
<Snackbar message="Here is snackbar message" open={true} autoHideDuration={6000} onClose={() => {}}>
<Alert severity="error">
<AlertTitle>Error</AlertTitle>
This is an error alert — check it out!
</Alert>
</Snackbar>
Run Code Online (Sandbox Code Playgroud)
但@materialui/core不导出Alert或AlertTitle组件:
这是讨论 Alert / AlertTitle 的链接 - 但我不知道如何导入这些组件:(
我正在为我的客户评估 React-Material 网格。关键反馈之一是没有替代行阴影,这会影响用户体验。
https://material-ui.com/components/data-grid/#mit-version
这可能吗?
谢谢你,
秀
我已经使用 react-select 实现了下拉列表,其中显示了预先输入的选项,但最初下拉列表很大并且占据了整个页面。我想知道如何将 react-select 下拉列表的样式设置为固定高度,并在溢出时提供滚动。 反应选择
以下是我的部分代码
class Project extends React.Component {
render() {
const selectStyles = {
input: base => ({
...base,
color: theme.palette.text.primary,
'& input': {
font: 'inherit',
},
})
};
return ( <
SelectN inputProps = {
{
name: 'headedByUserId',
id: 'headedByUserId',
}
}
classes = {
classes
}
styles = {
selectStyles
}
options = {
suggestions
}
components = {
components
}
value = {
this.state.fields["headedByUserId"]
}
onChange = {
this.handleChangeDropdown.bind(this, "headedByUserId")
}
placeholder = …Run Code Online (Sandbox Code Playgroud)