add scroll top in alert.jsx
このコミットが含まれているのは:
コミット
91f249fbc6
|
@ -43793,6 +43793,7 @@ var Alert = function Alert(props) {
|
|||
//props.type == 'success' alert-success
|
||||
//props.type == 'danger' alert-danger
|
||||
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
||||
window.scrollTo(0, 0);
|
||||
var timer = setTimeout(function () {
|
||||
clearTimeout(timer);
|
||||
if (props.hide) props.hide();
|
||||
|
@ -45840,7 +45841,7 @@ var ParentAuth = /*#__PURE__*/function (_Component) {
|
|||
|
||||
|
||||
if (document.getElementById('p-auth')) {
|
||||
console.log("v1: 2021/12/15");
|
||||
console.log("v1: 2021/12/21");
|
||||
react_dom__WEBPACK_IMPORTED_MODULE_1__.render( /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(ParentAuth, {}), document.getElementById('p-auth'));
|
||||
}
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@ const Alert = (props) => {
|
|||
//props.type == 'success' alert-success
|
||||
//props.type == 'danger' alert-danger
|
||||
|
||||
useEffect(
|
||||
() => {
|
||||
useEffect(() => {
|
||||
window.scrollTo(0, 0);
|
||||
let timer = setTimeout(()=>{
|
||||
clearTimeout(timer);
|
||||
if(props.hide) props.hide();
|
||||
|
@ -14,7 +14,9 @@ const Alert = (props) => {
|
|||
},[]);
|
||||
|
||||
return (
|
||||
<div className={`alert-${props.type} ft-18 ft-xs-16`}>{props.children}</div>
|
||||
<div className={`alert-${props.type} ft-18 ft-xs-16`}>
|
||||
{props.children}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ export default class ParentAuth extends Component {
|
|||
// ----------------------------------------------------------------------
|
||||
|
||||
if(document.getElementById('p-auth')){
|
||||
console.log("v1: 2021/12/15")
|
||||
console.log("v1: 2021/12/21")
|
||||
ReactDOM.render(
|
||||
<ParentAuth />,
|
||||
document.getElementById('p-auth')
|
||||
|
|
新しいイシューから参照